Script to Find and combine multiple files into one on a move
Posted on 2013-10-28
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.
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.