- To ping an Ip address until user stops
Output may defer according to system so, write the code and execute/run your batch file
@echo off
ping 8.8.8.8 -t
pause
Pinging 8.8.8.8 with 32 bytes of data: Reply from 8.8.8.8: bytes=32 time<1ms TTL=128 Reply from 8.8.8.8: bytes=32 time<1ms TTL=128 Reply from 8.8.8.8: bytes=32 time<1ms TTL=128 Reply from 8.8.8.8: bytes=32 time<1ms TTL=128 Reply from 8.8.8.8: bytes=32 time<1ms TTL=128 ................... ................... .................. Reply from 8.8.8.8: bytes=32 time<1ms TTL=128Program
After writing the code, Double-click your batch file, you will get the ping result
:: cmd to ping an ip & loop
ping [IP_ADDRESS] -t
To stop, user should press Ctrl + C