Operating System - Microsoft
1752770 Members
4929 Online
108789 Solutions
New Discussion

Re: script tp modify 300 printers

 
Dani_Galera
Occasional Advisor

script tp modify 300 printers

hello,

i have a file with 300 printers
i should execute the following command to each printer:

pdset -cd -x"-discard-time 43200" printer_name

i have something:

for /f %%p in (printer_list.txt) do call pdset.bat %%p
Pause

and pdset.bat has

pdset -cd -x"-discard-time 43200" %%p

but is not working

could anybody help me, please¿

thanks

regards
1 REPLY 1
Jon Finley
Honored Contributor

Re: script tp modify 300 printers

Your IF statement looks good.

Your called BAT file parameter is the problem.

It should be %1 I.E.

pdset -cd -x"-discard-time 43200" %1

Jon
"Do or do not. There is no try!" - Yoda