# Batch file ping constant loop



## KathyLee (Aug 29, 2011)

I have a list of over a thousand computers I need to ping. In theory I have it figured out to run a batch ping on the computer names. The only issue is that I have it set to pause after each one and yet it keeps on trying the first one as if it were in a constant loop. I've tried running a delay on it to give it the time to give up on trying and go to the next one but with no luck.
It never gets past the first computer without result. Please Help

Here's pretty much what I have:

@Echo Off
ECHO ping Computer1
ping Computer1
:: /n /ty,10 > nul ===> didn't work just sits there and does nothing no matter how long i let it sit
:: -n 1 -w 60000 >NUL ===> didn't work
pause
ping Comptuer2
pause


----------



## Squashman (Apr 4, 2003)

If you really have that many computers you want to ping I would use a program that allows you to make a list of the computers you want to ping and then have it do the dirty work for you. There are plenty of programs that can do this already and are free. Two of the programs that I have used in the past are SuperScan & Morten's Hosts Alive.

But even if you are doing this in batch I would also create a text file of the computers I want to ping and then use a single FOR LOOP to parse the text file and ping the computer.


----------

