need help writing a batch file to ping a list of servers

Pepsei

Lifer
Dec 14, 2001
12,895
1
0
I need a batch file that will ping a list of servers from another text file and then write to a new text file with the ip address.

can anyone give me some pointers?
 

darktubbly

Senior member
Aug 19, 2002
595
0
0
Assume ip.txt contains IP addresses on each line. -n 1 means ping once while -w 100 means wait up to a 100ms for a response.

Not quite sure what you mean by writing back to another text file. Write what back?
 

DarkTXKnight

Senior member
Oct 3, 2001
933
0
71
Im betting that he means that he wants to give a list of servers by hostname, then ping that server and write out what ip address comes back into another text file?