H
H
Hryhorii Shcherbak2019-06-11 10:12:22
cmd/bat
Hryhorii Shcherbak, 2019-06-11 10:12:22

Where is the error in my BAT file?

There is one BAT file that should print the contents of the folder

for %%i in (*.pdf) do (
"C:\Program Files (x86)\Adobe\Acrobat Reader DC\Reader\AcroRd32.exe" /t %%i%"
)
pause

And the code works, but prints on a standard printer. Having previously asked the question here, how to specify another printer, I received the answer:
/ t
I did this for myself:
for %%i in (*.pdf) do (
"C:\Program Files (x86)\Adobe\Acrobat Reader DC\Reader\AcroRd32.exe" /t %%i%" <C5045a3sw> <Canon iR-ADV C5045 UFR II V4> <IP_192.168.160.56> 
)
pause

But printing fails, Acrobat Reader swears: An error occurred while opening this document. Syntax error in folder name file name or volume label.
How can I fix it?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
res2001, 2019-06-11
@res2001

Perhaps /t should be placed before the printer name, and not before the file?
%%i%I don't think it's right, I should %%i.
Those. it goes something like this:

for %%i in (*.pdf) do (
"C:\Program Files (x86)\Adobe\Acrobat Reader DC\Reader\AcroRd32.exe" %%i /t <C5045a3sw> <Canon iR-ADV C5045 UFR II V4> <IP_192.168.160.56> 
)
pause

If anything, I don’t know about the correctness of the adoberd32 parameters - you need to look at the documentation on the command line parameters of this software.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question