Ich erzähle Ihnen, wie ich es in bash gemacht habe, und vielleicht können Sie es übersetzen.
Ich benutze pdfunite
(etwas direkter als pdftk
), aber sobald Sie die Syntax herausgefunden haben, ist das einfach genug.
for AFILE in `ls 2016*AAA*.pdf` ## For each of the files starting with 2016_AAA do BFILE=`echo $AFILE | sed -e 's/AAA/BBB/'` ## I use stream editor to replace the AAA with BBB and define the ## new file name. You can probably use SUBSTITUTE in Win pdftk $AFILE $BFILE cat output OUTPUT-$AFILE ## This will combine $AFILE and BFILE into OUTPUT-AFILE done
Hoffentlich gibt Ihnen das einen Anfang.