1

Possible Duplicate:
Batch file to MASS ping group of computers on network by name, check reply, and resolve hostname

I am trying to ping many IP's at once and to date it's been done manually. I would like to write a batch script that reads from a list of IP's and then pings each connection, then reports if the ping test failed.

This is the code i've had so far:

@echo off

for /f "tokens=*" %%I in ("C:\batch\IPlist.txt") do call 
:pinger %%I
goto :eof
:pinger
echo %TIME% >> "C:\batch\pingLOG.txt"
ping %1 >> "C:\batch\pingLOG.txt"
::DONE

I do this but even using pauses it returns no pingLOG.txt.

any ideas?

Thanks, Dylan

Dylan Cohen
  • 11
  • 1
  • 2
  • 2
    Have you tried searching on Serverfault for similar questions? This would appear to do what you want: http://serverfault.com/questions/85372/batch-file-to-mass-ping-group-of-computers-on-network-by-name-check-reply-and-r – Jeff Miles Aug 19 '11 at 14:44

1 Answers1

0

Is this a coding questions or a server management question?

If it is the latter, then you might just want to use FREEping by Tools4ever. This is a free solution to your problem, as you can add hosts to ping and it will popup to tell you when the ping fails to reach its destination. You can easily set a time between ping, the packet size as well as other useful features.

Paul
  • 181
  • 1
  • 6