paus batch file

  • Thread starter Thread starter JT
  • Start date Start date
JT said:
Hi, I wont to paus a batch file for a few seconds, what
command do I use? ( OS WinXP)
Hi

Alternatively, do a sleep using ping.exe (not CPU intensive).

Sleep approx. 5 seconds (number behind -n is seconds +1):

ping.exe -n 6 127.0.0.1 >nul
 
Oops! Wrong one.

sleep.exe from Gammadyne is 124k,
sleep.exe from Sadowski is 83.2k and
the one I have been using for some time (same syntax as Paul
Sadowski's; I did not make a note of where I got it from) is
25.4k !
I did not know there were so many programs of the same name - a
good job someone is awake.

Regards

Ray
 
Ray McCormick said:
Oops! Wrong one.

sleep.exe from Gammadyne is 124k,
sleep.exe from Sadowski is 83.2k and
the one I have been using for some time (same syntax as Paul
Sadowski's; I did not make a note of where I got it from) is
25.4k !

The one from the resource kit is just over 5K.

About 200 bytes :-)

args = WScript.Arguments.Count
if args <> 1 then
Wscript.Echo "usage: " & Wscript.ScriptName & " time-to-sleep-in-seconds"
wscript.Quit
end if

wscript.sleep 1000 * WScript.Arguments.Item(0)

85 bytes:
:sleep
:: sleep for x number of seconds
ping -n %1 127.0.0.1 > NUL 2>&1
goto :EOF

Problem with these is software firewalls and AV's my block them and stop
them from working.
 
Back
Top