I am working on making a list of pdf files. There are 2480 pdfs in the directory. I want to put the first half in var l1 and the second in var l2.
for /r %%f in (*_*.pdf) do (
set c=%%~nf
set c=%c:~5,4%
if %c% LEQ 1240 ( set l1=%l1% %%~nf.pdf )
if %c% GEQ 1241 ( set l2=%l2% %%~nf.pdf )
)
pdftk %l1% cat output group1.pdf
pdftk %l2% cat output group2.pdf
I have tried several combinations but cant quite get it to work. The aforementioned script is the basic premiss of what I need done. I am using pdftk to merge the files.