Friday, July 18, 2008

TPM - Ping batch file

Using the batch file below to log pinging to ISP gateway 75 times every 10 minutes. I had to install Windows 2003 Resource kit from microsoft.com to get the sleep.exe command.


REM testing Internet Connection

:loop
DATE /T >>d:\shares\apps\batch\pinggw.log
TIME /T >>d:\shares\apps\batch\pinggw.log
ping -n 75 66.91.146.97 >>d:\shares\apps\batch\pinggw.log
sleep 600
goto loop

No comments: