Printing PDFs from Windows Command Line

后端 未结 11 540
我寻月下人不归
我寻月下人不归 2020-11-30 01:06

I\'m trying to print all pdfs in current dir. When I call this bash script in cmd (singlepdf.sh): \'\"C:\\Program Files (x86)\\Adobe\\Reader 10.0\\Reader

11条回答
  •  孤街浪徒
    2020-11-30 01:44

    First response - wanted to finally give back to a helpful community...

    Wanted to add this to the responses for people still looking for simple a solution. I'm using a free product by Foxit Software - FoxItReader.
    Here is the link to the version that works with the silent print - newer versions the silent print feature is still not working. FoxitReader623.815_Setup

    FOR %%f IN (*.pdf) DO ("C:\Program Files (x86)\Foxit Software\Foxit Reader\FoxitReader.exe" /t %%f "SPST-SMPICK" %%f & del %%f) 
    

    I simply created a command to loop through the directory and for each pdf file (FOR %%f IN *.pdf) open the reader silently (/t) get the next PDF (%%f) and send it to the print queue (SPST-SMPICK), then delete each PDF after I send it to the print queue (del%%f). Shashank showed an example of moving the files to another directory if that what you need to do

    FOR %%X in ("%dir1%*.pdf") DO (move "%%~dpnX.pdf" p/)
    

提交回复
热议问题