SRL Archive - Help

CMD ''Wait'' command?!?!


NiiX

2009-11-10 13:13:37

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=.oooooooooooooooooooooooooooooooooooooooooooooooooooo
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.

rogeruk

2009-11-10 18:53:48

PING 1.1.1.1 -n 1 -w 5000 >NUL

works for me

Rick

2009-11-10 19:09:25

You could try:

PING 1.1.1.1 -n 1 -w 60000 >NUL
or
PING -n 61 127.0.0.1>nul


You could also use Sleep.exe [Microsoft] and use the command: SLEEP 3600

Wizzup?

2009-11-10 19:39:27

Just use "sleep".

NiiX

2009-11-11 11:25:25

Ty Richie and Wizzup!

For anyone with this problem in the future download this program and then ''Sleep X'' will work like it is supposed to.

code841

2009-11-11 16:05:18

Yes but if you were planning to have the script run on other computers, they'd need to install that on as well which is to me a big hassle.

NiiX

2009-11-12 14:08:33

From: code841
Yes but if you were planning to have the script run on other computers, they'd need to install that on as well which is to me a big hassle.


This script will be used locally to test something, I have full control over the PC's.