cmd - Ping Test Batch File to Text Output of Results -


i wrote simple .bat file pings 6 ip addresses on start , pauses window can go through , make sure each responding.

i wondering if possible create output .txt file simplifies results. instead of output of like:

pinging www.google.com [74.125.226.17] 32 bytes of data: reply 74.125.226.17: bytes=32 time=9ms ttl=51 reply 74.125.226.17: bytes=32 time=9ms ttl=51 reply 74.125.226.17: bytes=32 time=9ms ttl=51 reply 74.125.226.17: bytes=32 time=9ms ttl=51  ping statistics 74.125.226.17:     packets: sent = 4, received = 4, lost = 0 (0% loss), approximate round trip times in milli-seconds:     minimum = 9ms, maximum = 9ms, average = 9ms 

in .txt file read "%servername% online , responsive" or "%servername% not responsive," when reporting packet loss.

i'm not sure if possible simple batch file if not, can point me in right direction of language?

set "servername=www.google.com" ping %servername% |find "ttl" >nul && echo %servername% online || echo %servername% offline 

you may want play pings parameters /n , /w


Comments

Popular posts from this blog

html - Firefox flex bug applied to buttons? -

html - Missing border-right in select on Firefox -

python - build a suggestions list using fuzzywuzzy -