Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have 3 folders:

Folder 1 
Folder 2
Folder 3

In each folder I have 5 pdf files:

    Folder 1 
    Folder 2
    Folder 3

I want that in each folder to have a combined file of those two files:

    Folder 1 
    Folder 2
    Folder 3

Any idea? Don't tell to do it manually. This case is just to explain you my problem. Think that I have hundreds of folders. :) Maybe I can use another tool instead of Adobe Acrobat?!

share|improve this question
What exactly do you mean by "have a combined file of those two files"? Would concatenate and merge these two files into 1 PDF work for you? – Kurt Pfeifle Feb 23 '12 at 23:03
Adobe Acrobat or Adobe Acrobat Reader? – wmz Aug 24 '12 at 23:13
@AndreiAndre Many good solutions were posted to your question. Maybe you could choose the one which fits all your needs and mark it as accepted. – nixda Feb 11 '13 at 9:35

You can do this with a short batch file and pdftk.exe (not pdftk Builder which is the GUI version).
There is no need to install anything.


  • download & extract pdftk with UniExtract
  • Open ..\pdftk\bin* and copy pdftk.exe and libiconv2.dll to a folder of your choice
  • create a new text file and paste the following code

    @echo off
    setlocal enabledelayedexpansion
    FOR %%A IN (%*) DO (set command=!command! %%A)
    pdftk.exe %command% cat output "%~dp1binder.pdf"
  • Save it as merge@pdf.cmd in the same folder as pdftk.exe and libiconv2.dll enter image description here
  • create a shortcut of this .cmd and place it in your sendto folder (Win+R » shell:sendto)


  • Go to a folder with some PDF files and select as many PDFs as you want
  • Right-click them and choose the shortcut you just created
  • a new binder PDF in the same folder will be created where all selected PDFs are merged into one

    enter image description here

share|improve this answer

If you're on Linux (or Mac, or any environment where it is installed), you can use a command-line tool called ghostscript to combine them.

gs -dNOPAUSE -sDEVICE=pdfwrite -sOUTPUTFILE=combinedpdf.pdf -dBATCH file1.pdf file2.pdf file3.pdf

You can also use the following to combine all files in the current folder

gs -dNOPAUSE -sDEVICE=pdfwrite -sOUTPUTFILE=combinedpdf.pdf -dBATCH *.pdf 

You can download ghostscript here. There's a Windows version as well, but I didn't test it.

share|improve this answer
It works on windows, too. I had to write the full path to the ghostscript executable (on my PC it's "c:\Program File\gs\gs9.07\bin\gswin32c.exe") and the "*.pdf" expansion doesn't work, but ghostscript itself works perfectly. – Pitarou Feb 22 '13 at 7:05

I have used the above solution successfully. However, on my system (Windows 7 64-bit) the code as it is adds the PDFs in (apparently) random order, not alphabetically by filename.

To get it to add files in alphabetic order you will need to add the sort-object parameter to the DIR (aka Get-ChildItem) command (the sort-object takes no parameter here as filename/alphabetically is the default):

dir $inputfolder -r -include *.pdf -exclude $outputfile | sort-object | group DirectoryName % {& $PDFtk $.group CAT OUTPUT "$($.Name)\$outputfile" verbose}

Those who have filenames of the form 1.pdf 2.pdf ... 10.pdf etc. rather than 01.pdf 02.pdf .. 10.pdf may also like to try a variation of this:

pdftk *?.pdf *??.pdf *???.pdf *????.pdf cat output out.pdf
share|improve this answer

Perhaps it is better to use a batch scenario. Create and collect all your pdf files as xxxx.abcdef.pdf.

First part is the so-called batch tag; second part is file identifier (file name). Tags for each back are similar in length and value; name of files come after the point.

For instance your first batch consists of 1111.3425.pdf, 1111.76501.pdf, so on. Your second batch is 22222.1432.pdf, 22222.4398, so on. And so on and so forth for other batches.

Then you can use automated merge software that can deal with thousands of files creating a separate merge for each batch. I found this Dysprosium free software that does not need a command line or a batch script. You can download it as a portable JAR file. It has different automated scenarios; one described in this answer as tagging and one as your required folder separated.

Depending on your hardware you can batch merge thousands of files into pre-destined batches.

share|improve this answer

Try PDFMerge. But don't use the initial form where you have to select each file one by one. Instead, wait for the site to check your Java installation, then click on "Try the PDFMerge Java Applet" link. Once the applet is loaded and allowed to run, click on Choose files button, and you'll be able to select multiple files (to merge into one file).

The merging will be superfast and will be able to handle large number of files as nothing is uploaded into the website. Everything is done in your computer itself using your Java installation.

PS: Sorry if you're looking for an offline software that can be customized to create single PDF files across multiple folders.

share|improve this answer

If you are on mac you could create an Automator script to achieve this task. Make it as a folder action and simply drop the pdfs into it and see it happen! If you want I can show you how, are you running mac?

share|improve this answer

There is a new online Advanced PDF Manipulation tool called Sej-da which is still in Beta, which has a myriad of PDF functions (inc ability to merge multiple pdfs). It free & could well help your needs.

A brief review of its functions was carried out only a couple of weeks ago by Revision 3:

share|improve this answer

You must log in to answer this question.

protected by Community Oct 25 '14 at 16:08

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged .