Thursday 5 July 2012

Infinite Ping, with timed log

I've had to write this little beauty a few times over the years and realised its quite useful and that people like you may find it useful. You could extend it, or replace the ping with a tracert, pathping or anything else you desire. You can even use it in a scheduled task, which will let you kill it when the ping is no longer needed if you want to check connection problems during a certain time of day. The possibilities are endless! ... well maybe that's over exaggerated, slightly.


:Loop
echo The time is %time:~0,8% >> PingLog.txt
Ping -n 60 www.google.com >> PingLog.txt
Echo. >> PingLog.txt && Echo. >> PingLog.txt && Echo. >> PingLog.txt
if %time:~0,5% == 17:10 goto :EOF
Goto Loop

The pings will stop at 17:10, change this time if you wish or delete the line if you want a ping until you stop it manually or your scheduled tasks ends.

No comments:

Post a Comment