CaTaLinU Posted May 9, 2012 Share Posted May 9, 2012 It is possible to make something like this ...@ECHO OFFTitle Service CheckCD\CLSRem Step 1:Ping 95.76.53.219echo Your connection to the 95.76.53.219 is %ms%PauseI want to show only the average Ms ...it is possible ? Link to comment Share on other sites More sharing options...
bphlpt Posted May 9, 2012 Share Posted May 9, 2012 [barely resisting the urge to simply answer your question "Yes, have a nice day ]@ECHO OFF(Set "addr=95.76.53.219")FOR /F "skip=10 tokens=4 delims==" %%G IN ('Ping %addr%') DO ECHO Your connection to %addr% is %%GPauseThis does no error checking at all and assumes that ping returns the standard response and does not time out.Reference: http://ss64.com/nt/for_cmd.htmlCheers and Regards Link to comment Share on other sites More sharing options...
Yzöwl Posted May 9, 2012 Share Posted May 9, 2012 Is there a particular reason why you are looking for the average round trip time from four pings with a one second timeout?BTW I'd probably change the above example to this@ECHO OFF & SETLOCAL ENABLEEXTENSIONS(SET addr=95.76.53.219)FOR /F "TOKENS=4 DELIMS==" %%# IN ('PING %addr%^|FIND "Average"') DO ( ECHO=Your connection to %addr% is%%#)PAUSE Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now