I have one pdf file in sub-folder of
C:\database\local\download\PDF\folder1\*.pdf
C:\database\local\download\PDF\folder2\*.pdf
C:\database\local\download\PDF\folder3\*.pdf
I am trying to merge this each pdf file from those sub-folders and send it to C:\ConsPDF\ folder with pdftk.exe
Code: Select all
@echo off
for /d %%a in ("C:\database\local\download\PDF\*") do (
pushd "%%~a"
"C:\Program Files (x86)\PDFtk\bin\pdftk.exe" *.pdf cat output "C:\ConsPDF\merge.pdf.bin"
ren "C:\ConsPDF\merge.pdf.bin" "merged.pdf"
popd
)
Its not creating a merged pdf file, any one please rectify the mistake.