loops - Looping through a directory in DOS and performing a command on them -
i have folder of pdf documents want strip first page off. have found tool command line , works successfully.
command using:
pdftk 1.pdf cat 2- output 1_stripped.pdf
where 1.pdf
original filename, , have 1_stripped.pdf
output file.
it take me forever each file, i'm sure within dos there must way of looping around every file in directory , doing command them. (passing in filename automatically , having output having "_stripped" @ end. i'm struggling it.
i thought trick:
for file in *.pdf pdftk "$file" cat 2- output "$file"stripped; done
but i'm getting error messages.
could point me in right direction?
Comments
Post a Comment