Batch print files in alphabetical order
6,890
Solution 1
dir /b | sort > %temp%\files.tmp
for /f %f in (%temp%\files.tmp) do AcroRd32.exe /t %f "\\servername\printername"
del %temp%\files.tmp
Solution 2
Details here about silent print command in Adobe reader.
so you can do (batch file):
for %%X in (*.pdf) do AcroRd32.exe /t %%X "\\servername\printername"
or (cmd prompt):
for %X in (*.pdf) do AcroRd32.exe /t %X "\\servername\printername"
Related videos on Youtube
Author by
Christoph Rüegg
Updated on September 17, 2022Comments
-
Christoph Rüegg almost 2 years
I have a folder with hundreds of small PDF files to print.
How can I make a batch job to print them out in alphabetical order? -
user1184899 over 14 yearsHi this does not guarantee the print in alphabetical order. :(
-
Shevek over 14 yearsWell, it does the same as a standard DOS dir *.pdf so it should be in order...
-
Shevek over 14 yearstry this to prove the sort order: for %X in (*.pdf) do echo %X
-
user1184899 over 14 yearsdon't work... just try. I create files: 3.pdf, 1.pdf, 2.pdf in a folder. then your command: C:\1>for %X in (*.pdf) do "C:\Program Files\Adobe\Acrobat 9.0\Acrobat\Acrobat.ex e" /t %X C:\1>"C:\Program Files\Adobe\Acrobat 9.0\Acrobat\Acrobat.exe" /t 1.pdf C:\1>"C:\Program Files\Adobe\Acrobat 9.0\Acrobat\Acrobat.exe" /t 2.pdf C:\1>"C:\Program Files\Adobe\Acrobat 9.0\Acrobat\Acrobat.exe" /t 3.pdf but in the printer I found this order of printing: 2-1-3. LOL! :)
-
Shevek over 14 yearsthat doesn't make sense!!! if the command is executed 1,2,3 then it should print 1,2,3...
-
Shevek over 14 yearsI repeated same with the echo test, creating 2,1,3 and it has definitely echoed 1,2,3... (I'm on Win7)
-
user1184899 over 14 yearsHi! I know that is weird :(
-
Shevek over 14 yearswhat happens if you pause the print queue and send to print. What order do they appear in the queue?
-
Jess Stone over 10 yearsthanks for your solution. anyway how come windows explorer sorts files in a different order?