lotharamious
Member
Hey folks,
My goal is to put in an IP range from say 1.2.w.x to 1.2.y.z, and have it return all of the results in a log file. All I need is a "success" or "fail". Preferrably I want all the successful pings to go in a success.txt and all the failures go in fail.txt. I don't care about response or timestamps. I also would like it to echo to the command line all of the results as well as to the output files.
Any suggestions?
Right now I have it read from a text file all of the IPs I want tested. I would rather not do it this way. Here is what I have so far.
Thanks
Here is the code:
:: multiIP.bat
@echo off > pingLOG.txt
for /f "tokens=*" %%I in (IPlist) do call : pinger %%I
goto : eof
: pinger
echo Pinging %1...
echo %TIME% >> pingLOG.txt
ping -n 2 -f -w 400 %1 >> pingLOG.txt
:: DONE
My goal is to put in an IP range from say 1.2.w.x to 1.2.y.z, and have it return all of the results in a log file. All I need is a "success" or "fail". Preferrably I want all the successful pings to go in a success.txt and all the failures go in fail.txt. I don't care about response or timestamps. I also would like it to echo to the command line all of the results as well as to the output files.
Any suggestions?
Right now I have it read from a text file all of the IPs I want tested. I would rather not do it this way. Here is what I have so far.
Thanks
Here is the code:
:: multiIP.bat
@echo off > pingLOG.txt
for /f "tokens=*" %%I in (IPlist) do call : pinger %%I
goto : eof
: pinger
echo Pinging %1...
echo %TIME% >> pingLOG.txt
ping -n 2 -f -w 400 %1 >> pingLOG.txt
:: DONE