0

I want to print multiple files (PDF-files) to my default printer using a batch file.

I have a folder on this location C:\Temp\Print\

In this folder I have two PDF-files. I have created a simple .bat file, and when I run it the command window says that both files is currently being printed. When I go to the printer only one PDF-file is printed, not both..

What am I missing..??

Here is the code in my .bat file:

print C:\TEMP\Print\* /d:\\"MyDefaultNetworkPrinter"
;pause

I would like for all PDF-files to be printed when located in the C:\Temp\Print\ folder when I run the script.

  • Well, the [`print` command](https://ss64.com/nt/print.html) is intended for text files only (type `print /?`)... – aschipfl Aug 22 '19 at 10:55
  • Ahhh.. I see. Thanx. Any suggestions or links to how I can accomplish my issue..?? – Morten Sørensen Aug 22 '19 at 12:38
  • There is no global command that can just open any file type and print it, you will always need an application that is capable of understanding the file format, PDF in your situation; take a look at the documentation of your PDF application (reader) and check out whether it features command line options for automated printing (see [this thread](https://stackoverflow.com/q/619158), for example)... – aschipfl Aug 22 '19 at 12:56

1 Answers1

0

try this:

cd\path\to\pdf\files
for %%f in ("*.pdf") do AcroRd32.exe /t %%f "\\servername\printername" & ping localhost -n 6 >NUL
D. Vinson
  • 1,090
  • 6
  • 8
  • Thanx for the suggestion. But this only opens the Adobe Reader and nothing more. It doesn't print not even when I add the 'do print' command.. – Morten Sørensen Aug 22 '19 at 11:58
  • https://stackoverflow.com/q/12417335/10030784 here's a similar question with a a few answers that might help – D. Vinson Aug 22 '19 at 14:33