Jump to content
Sign in to follow this  


Recommended Posts

Hello everyone. I am wanting to ping a website with cmd. for example yotube.com...



Pinging youtube.com [] with 32 bytes of data:
Reply from bytes=32 time=184ms TTL=45
Reply from bytes=32 time=241ms TTL=45
Reply from bytes=32 time=198ms TTL=45
Reply from bytes=32 time=223ms TTL=45

Ping statistics for
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 184ms, Maximum = 241ms, Average = 211ms


Ok and then I want to use the findstr command to get the IP address only and save it into a text file... it sould look like this > atextfile.txt


But my only problem is my program doesnt know what the IP address is so i'm trying to extract t row of numbers like so and that is the IP address.


I have only gotten this far


findstr /x "Ping statistics for [0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*" C:\Users\username\Desktop\IP.txt >>C:\Users\username\Desktop\data.txt

echo You are winning
) else (
echo You are losing
goto start


and it would only take the IP address and save it into a text file. Any Help would be nice :)

Edited by Adrianvdh

Share this post

Link to post
Share on other sites
Sign in to follow this  


Important Information

By using this site, you agree to our Terms of Use.