Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

timeout and sleep command in XP

7,085 views
Skip to first unread message

Dragan

unread,
Jul 20, 2009, 9:07:02 AM7/20/09
to
I need timeout or sleep command, but now I see that they're not listed
in command-line reference for Windows XP.
Is there any extension out there that can upgrade list of available
commands?

cheers,

Dragan

01MDM

unread,
Jul 20, 2009, 9:13:22 AM7/20/09
to

`ping -n 61 localhost 1>nul` set a minute timeout

In addition, there are many utilities for a pause in a command file.
Such as sleep.exe, nircmd(c).exe and etc.

sw0rdfish

unread,
Jul 20, 2009, 9:19:31 AM7/20/09
to

you can implement your own sleep using vbscript

WScript.Sleep WScript.Arguments.Item(0) 'in milliseconds.

save as sleep.vbs and use it in your batch as

@echo off
rem main.....
rem sleep for 10 milliseconds
cscript /nologo sleep.vbs 10
rem do stuff

OR you could download sleep.exe from the internet. search for it using
google.

Ted Davis

unread,
Jul 20, 2009, 3:57:09 PM7/20/09
to

You can add many of the standard *ix utilities - free and open source Gnu
ports to Win32: <http://gnuwin32.sourceforge.net/packages.html>.

sleep is in the CoreUtils package:
<http://gnuwin32.sourceforge.net/packages/coreutils.htm>.

--
T.E.D. (tda...@mst.edu)

george_...@hotmail.com

unread,
Dec 28, 2017, 5:10:32 PM12/28/17
to
timeout for Windows XP "batch file" or "Windows Command Script"!!! :)
LOL ;) no ping!!!




@echo off
title XP-timeout-v4

ver | find "XP" > nul
if %ERRORLEVEL% == 1 timeout /t 03 && echo . Vista - 10 && goto NEXT

set XP-timeout=3000
echo . XP, 1000 = 1 sec, approximately
set /a timeout=1
:timer
echo timeout timer number %timeout%
if %timeout% == %XP-timeout% goto NEXT
echo . XP, 1000 = 1 sec.
set /a timeout=timeout+1
goto timer
:NEXT
echo XP - 10, 3 sec
pause
EXIT

Sponge Belly

unread,
Dec 30, 2017, 11:35:09 AM12/30/17
to
Read this SO answer by npocmaka:

https://stackoverflow.com/a/33286113/6816892
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted

George H. Compton IV

unread,
Dec 30, 2017, 6:02:16 PM12/30/17
to
multiple timeouts, (set timer#=copy "XP-timeout.cmd") to the name of your CMD or bat file!!

@echo off
title=XP-timeout-v4.1+

set timer#=copy "XP-timeout.cmd"

ver | find "XP" > nul
if %ERRORLEVEL% == 1 timeout /t 05 && goto next1
%timer#% "1"
set XP-timeout=5000
goto pretimer
:next1

ver | find "XP" > nul
if %ERRORLEVEL% == 1 timeout /t 02 && goto next2
%timer#% "2"
set XP-timeout=2000
goto pretimer
:next2

ver | find "XP" > nul
if %ERRORLEVEL% == 1 timeout /t 03 && goto next3
%timer#% "3"
set XP-timeout=3000
goto pretimer
:next3

echo WIN XP - 10, timeout
pause
exit

:pretimer
set /a timeout=1
:timer
echo timeout timer number %timeout%
if %timeout% == %XP-timeout% goto next
echo . XP, 1000 = 1 sec.
set /a timeout=timeout+1
goto timer
:next
if exist "1" del 1 && goto next1
if exist "2" del 2 && goto next2
if exist "3" del 3 && goto next3
0 new messages