0

I have two folders of PDF files. Each folder has a file with the same name, and I would like to combine those two files. My issue seems to be that I need to keep the original name of the files after I combine them. So its like:

Folder 1: 0001.pdf Folder 2: 0001.pdf

I would need to combine them together into one file, keep the name (0001.pdf) after its combined, and then do that for over 8000 files in one sitting.

I'm not too great with command-line/batching and stuff, but know a little bit. Also would preferably need it to be free as I am doing this on a jobsite computer.

1
1

PDFtk, and Poppler are 2 possibilities I know of

With PDFtk

pdftk folder/file01.pdf folder2/file02.pdf folder3/file03.pdf cat output OutputFile.pdf

With Poppler

pdfunite folder1/file01.pdf folder2/file02.pdf folder3/file03.pdf OutputFile.pdf

Both applications are free as you requested. So hopefully a good answer for your needs.

3
  • Thanks for the help. PDFtk seems to work, it combined the two files, from the two different folders. But 2 further issues seemed to have come up. One, after I combine them, the output file needs to be named with original name automatically if possible.. And 2, I would need to do this multiple times in a row, for say 3000 or so files in each folder, but keep them separate as they go along, cause each pair of files will have different names. Hopefully this makes sense.
    – Matt
    Jun 28 '19 at 21:25
  • @Matt OutputFile.pdf can be any name you choose. As to processing a multitude of files. You'll probably want to attempt to Script the whole operation. I can probably update my post with an example. But you'll need to try to adapt it to your own needs. :)
    – somebody
    Jun 28 '19 at 21:37
  • Yes, I think I will need help with a script, if you can. I finally got the PDFTK program on my computer. I need the batch to combine files from 2 different folders, both files have the same name, and then output them to a third folder, keeping the original file name for each. There is 2000 files in each of the first two folders as well. Thanks
    – Matt
    Aug 19 '19 at 12:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.