how to ping for x mins and sleep for x mins in batch file

August 4, 2015 at 14:38:33
Specs: Windows 7
Am trying to write a script taht pings for x mins and sleeps for x mins. Following code only executes timeout and not ping

@echo off
cd /

:loop
echo %time% >> c:\test.txt
ping 8.8.8.8 >> c:\test.txt
timeout /T 60 /NOBREAK
GOTO loop


See More: how to ping for x mins and sleep for x mins in batch file

Report •

#1
August 5, 2015 at 20:21:01
If this line:

ping 8.8.8.8 >> c:\test.txt

puts nothing in the file, run:

ping 8.8.8.8

and see what it does.

=====================

M2 Get custom script or take private lessons


Report •
Related Solutions


Ask Question