NiiX
11-10-2009, 06:13 PM
I'm trying to make a batch script that will wait for X secs and then do another thing.
Here is the script I'm using.
@echo off
set max=.ooooooooooooooooooooooooooooooooooooooooooooo ooooooo
set count=.
:LOOP
PING 1.1.1.1 -n 1 -w 60000 >NUL
echo hello there
set count=%count%o
if not %count%==%max% goto LOOP
set max=
set count=
Pause
This is what I've found on the net ''PING 1.1.1.1 -n 1 -w 60000 >NUL'' but it won't work, I've tried with upto 1 min (60000) and it still won't actually wait, it just loops without waiting.
I've googled here and there but yet no REAL wait that works.
Here is the script I'm using.
@echo off
set max=.ooooooooooooooooooooooooooooooooooooooooooooo ooooooo
set count=.
:LOOP
PING 1.1.1.1 -n 1 -w 60000 >NUL
echo hello there
set count=%count%o
if not %count%==%max% goto LOOP
set max=
set count=
Pause
This is what I've found on the net ''PING 1.1.1.1 -n 1 -w 60000 >NUL'' but it won't work, I've tried with upto 1 min (60000) and it still won't actually wait, it just loops without waiting.
I've googled here and there but yet no REAL wait that works.