I want to create a batch file to combine selected pdf files in alphabetical order. Currently I have the following script:
@echo off setlocal enabledelayedexpansion FOR %%A IN (%*) DO (set command=!command! %%A) pdftk.exe %command% cat output "%~dp1binder.pdf"
The script file is saved as a .cmd file and a shortcut of it is placed into the 'SHELL:SENDTO' folder. Therefore it is possible to select some .pdf files, click on the right-mouse button and run the file to create binder.pdf which is a copy of the selected pdf files combined together.
The only problem left is that the batch file creates a pdf in random order when I select 15+ .pdf files. Is it possible to make sure that the selected .pdf files are merged in alphabetical order?