JohnDG 0 Posted August 27, 2004 I have a need to ping multiple devices in multiple sites on a daily basis. I also need to record the results, so we can tell if equipment is on-line and if response times are deteriorating. Can anyone tell me how to set up a script or file to do them all at once from a command prompt in Windows? (Go easy on me, I'm not an expert at command prompt issues) Thanks. John Share this post Link to post
thymios 0 Posted August 27, 2004 you can use "ping host >test.txt"(without the quotes of course) The results of the command will be printed on the file named test.txt For multiple files create a batch file (.bat) and write as many ping commands you want like the one up followed by carriage return.e.g. "ping host1 >test1.txt" "ping host2 >test2.txt" "ping host3 >test3.txt" Then all you have to do is run the batch file from the command prompt and you're done. The only thing i haven't managed to find yet is how to append information to the files created(every time you run the command with the same filename specified the file is overwriten). I'll ask some guru's at work and i might come up with the answer soon! Share this post Link to post
thymios 0 Posted August 27, 2004 you can use "ping host >test.txt"(without the quotes of course) The results of the command will be printed on the file named test.txt For multiple files create a batch file (.bat) and write as many ping commands you want like the one up followed by carriage return.e.g. "ping host1 >test1.txt" "ping host2 >test2.txt" "ping host3 >test3.txt" Then all you have to do is run the batch file from the command prompt and you're done. The only thing i haven't managed to find yet is how to append information to the files created(every time you run the command with the same filename specified the file is overwriten). I'll ask some guru's at work and i might come up with the answer soon! Share this post Link to post
Lotus 0 Posted August 27, 2004 Originally posted by thymios: Quote: The only thing i haven't managed to find yet is how to append information to the files created(every time you run the command with the same filename specified the file is overwriten). I'll ask some guru's at work and i might come up with the answer soon! You just need to add a second > like so: ping -n 5 xxx.xxx.xxx.xxx >> C:\ping.txt That will keep adding to the log without overwriting it. - Lotus Share this post Link to post
vimal09 0 Posted February 10, 2011 You can also check the ping here http://www.whoisxy.com/ping.aspx .It's free service.This will help you to test the connection. Share this post Link to post