I am looking for either a batch file or a vbscript that will merge like pdf file names. The files that should be combine will have the same file name all the way to the first “.” I have entire folders that contain about 4000 files. The file extensions match the following format
1111111111111111.22222222.pdf ==> 1 is any 16 numbers 0-9 and 2 is any 8 numbers 0-9
I would like to merge the like files of the folder in batch style. All the files that have identical file name up to the first should be merged “.”
Example: 1111111111111111.25484686.pdf should merge with 1111111111111111.54874568 while 5555555555555555.78468767 should merge with 5555555555555555.48687654 and 5555555555555555.68974582
The files could be outputted to another folder but is not required. The new file name after it is outputted doesnt matter either as long as it works.
I know that there is software that is out there that will handle this but it would take too long to drag and drop all like files to merge them.
A Google search found http://www.pdfsam.org/ – a site that offers a free PDF merge utility that has a command line interface (as well as a GUI). I have no idea how well this works. Make sure you get the free utility offered by this site and not the competitor’s solution that is advertised on the same site.
There are many other utilities out there, most of them for a fee.
Once you figure out how to use the command line interface of your utility of choice, you can use a batch file like the one below to dynamically build your list of files to merge. (This batch code is untested. The concept will definitely work, but it may need some debugging)