G
Guest
Ok, so I write this fairly simple line:
for /f "delims= tokens=1" %%A in (Printers.txt) do Ping %%A >>PingPrinter.txt
Printers.txt has a list of printer names in it and I can ping most of them
fine (I want to see which ones aren't pinging, hence the output to file).
But all I get in the output file is:
I:\Scripts\PrinterQ>for /F "delims= tokens=1" %A in (Printers.txt) do Ping
%A 1>>PingPrinter.txt
I:\Scripts\PrinterQ>Ping eqrdrp02001 1>>PingPrinter.txt
I:\Scripts\PrinterQ>Ping eqrprn_col_pdf 1>>PingPrinter.txt
I:\Scripts\PrinterQ>Ping eqrprn04001 1>>PingPrinter.txt
and so on...
In the dos box it says:
"The process cannot access the file because it is being used by another
process."
If I change the DO statement to something like @Echo Name: then I get a list
of the printer names in the output file.
Any ideas what could be going wrong?
for /f "delims= tokens=1" %%A in (Printers.txt) do Ping %%A >>PingPrinter.txt
Printers.txt has a list of printer names in it and I can ping most of them
fine (I want to see which ones aren't pinging, hence the output to file).
But all I get in the output file is:
I:\Scripts\PrinterQ>for /F "delims= tokens=1" %A in (Printers.txt) do Ping
%A 1>>PingPrinter.txt
I:\Scripts\PrinterQ>Ping eqrdrp02001 1>>PingPrinter.txt
I:\Scripts\PrinterQ>Ping eqrprn_col_pdf 1>>PingPrinter.txt
I:\Scripts\PrinterQ>Ping eqrprn04001 1>>PingPrinter.txt
and so on...
In the dos box it says:
"The process cannot access the file because it is being used by another
process."
If I change the DO statement to something like @Echo Name: then I get a list
of the printer names in the output file.
Any ideas what could be going wrong?