• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Help with PING batch

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
 
Back
Top