|
Answer» I want to make a batch/command file that will ping multiple IPs and save , "time=" from each ping from each IP, into a .txt file.
I tried this just to see if it would WORK
@ECHO PING 104.12.0.234 ¦ FIND "time=" > Pingtimes.txt
but i got a prompt with "C:\My Documents> PING 104.12.0.234 ¦ FIND "time=" > Pingtimes.txt" it just KEEP going all of the way down the command window. I had to close the window to stop it.
Maybe I wrote too much but hey if someone can help I would REALLY appreciate it.
PaulTry using the -n switch with a value of 1. Not sure that times= is really what you want. Perhaps MINIMUM, maximum or average would work better. Also use the /i switch with the FIND.
Just a THOUGHT. I figured out you have to use
PING.EXE doh!
that stopped the infiniloop.
if i do this PING.EXE 111.111.111.111 | find "Average" > file.txt PING.EXE 222.222.222.222 | find "Average" > file.txt
the second ping overwrites the 1st ping. is there a way around this?
Of course, on the second and subsequent PINGs using the >> redirection symbol. Very confused, your first post mentioned a FIND command....did I miss something?
i figured out how to use the FIND command to get what I want. I am now using it to put the whole min mx ave line into a text file. I want to have each subsequent ping into the text file so it looks like this.
Minimum = 588ms, Maximum = 593ms, Average = 589ms Minimum = 570ms, Maximum = 590ms, Average = 580ms
but instead each ping overwrites the previous.Im a putz, >> Appends the text file thus allowing multiple lines!! yeah! shoo its only taken me a few hrs to get this right. Thanks for the help.
|