ping script batch file

Microsoft Windows xp professional w/serv...
July 9, 2010 at 09:04:52
Specs: Windows XP
Getting error:

C:\Temp\IPlist.txt was unexpected at this time.

when running multiIP.bat:

:: multiIP.bat
@echo off

type C:\Temp\IPlist.txt
pause

for /f "tokens=*" %%I in C:\Temp\IPlist.txt do call :pinger %%I
goto :eof

:pinger

echo %TIME% >> C:\Temp\pingLOG.txt
ping %1 >> C:\Temp\pingLOG.txt
:: DONE

Please advise. TIA


See More: ping script batch file

Report •


#1
July 9, 2010 at 09:57:02
for /f "tokens=*" %%I in ("C:\Temp\IPlist.txt") do call :pinger %%I

Report •

#2
July 9, 2010 at 11:16:07
That seemed to do the trick. Thank you ace! Can you explain the need for the parentheses?

Report •

#3
Report •
Related Solutions


Ask Question