Link to home
Start Free TrialLog in
Avatar of ChesterfieldFire
ChesterfieldFire

asked on

Script to Find and combine multiple files into one on a move

I am running into a issue trying to come up with a script (.bat preferably but not absolute) file. I think the issue is finding the right terms to search for.

What I need is to search a directory for certain files that day that begin with similar text (one day there may be 4 files and the next there may be 10), grab all those files and move them to a different location and concatenate them. The trick is they need to all be combined into one file and given a different name.

I know it will be some type of move function and maybe grabs them a does some type of append... but not real sure.

Example:
Script runs
Grabs files from \\server\share1 named fileAB1.txt, fileAB2.txt, fileAC1.txt (so any files with fileA*.txt )
Moves the files to \\server2\share2 and combines the txt and leave a single file named CombinedA%date%.txt


These will all be text files.

thanks ahead of time.
ASKER CERTIFIED SOLUTION
Avatar of Bill Prew
Bill Prew

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ChesterfieldFire
ChesterfieldFire

ASKER

I will give it a test now. Thanks!
Awesome thanks Bill. Perfect. I knew it would be something I just could not search properly, but that seemed really easy :)
Welcome, glad that helped.

~bp