Hi All,
New to this but I'm trying to set up a .bat or .cmd file to run a ping every 12 hours on a loop and record it in a file.
I've got the below running (set to every 6 seconds for trialing) successfully in windows 7 but it won't work in XP.
@ECHO on
set IPADDRESS=8.8.8.8
set INTERVAL=6
:PINGINTERVAL
ping %IPADDRESS% -n 1 >> C:\test.txt
time /T >> C:\test.txt
date /T >> C:\test.txt
timeout %INTERVAL%
GOTO PINGINTERVAL
I also tried this one
@ECHO on
cls
:start
ping 8.8.8.8 -n 1 >> d:\test.txt
echo logged time = %time% %date% >> d:\test.txt
timeout /t 6
goto start
both work fine in windows 7, but not XP.
Thanks in advance