What's the equivalent of the DOS "sleep" command in the XP command prompt window?

I want to do the following from a .bat file under Windows XP

run a program
wait 5 seconds
run another program

What's the Windows XP command for "wait 5 seconds".  I tried "sleep" but that doesn't seem to be supported.
LVL 4
wile_e_coyoteAsked:
Who is Participating?
 
wile_e_coyoteAuthor Commented:
Ok - I found what I was looking for.  There's an XP compatible sleep.exe utility  in the NT Resource Kit

http://www.microsoft.com/downloads/details.aspx?familyid=9d467a69-57ff-4ae7-96ee-b18c4790cffd&displaylang=en

0
 
sunray_2003Commented:
Check if this do the trick

http://www.jsifaq.com/SUBO/tip7300/rh7307.htm

Sunray
0
 
wile_e_coyoteAuthor Commented:
I tried that, but it doesn't work


C:\xxx>timeout /t 2
'timeout' is not recognized as an internal or external command, operable program or batch file.
0
Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

 
sunray_2003Commented:
Can you not use a for loop to delay the process

Sunray
0
 
Mikal613Commented:
0
 
KenneniahCommented:
If the purpose of the delay is to wait until the first program is done to start the next use the Start command with the /wait option.

Start
Starts a separate Command Prompt window to run a specified program or command. Used without parameters, start opens a second command prompt window.

Syntax
start ["Title"] [/dPath] [/i] [/min] [/max] [{/separate | /shared}] [{/low | /normal | /high | /realtime | /abovenormal | belownormal}] [/wait] [/b] [FileName] [Parameters]

/wait
Starts an application and waits for it to end.
0
 
gemartiCommented:
Why not do it in the task scheduler?
START | PROGRAMS | ACCESSORIES | SYSTEM TOOLS | Scheduled Tasks
0
 
nrlzCommented:
What you could do is leverage off the ping command since it supports Timeouts. For example to wait 4 seconds:

echo wait...
ping -n 1 -w 4000 10.0.0.0
echo finished waiting.
0
 
wile_e_coyoteAuthor Commented:
I'm going to ask that this question be deleted since I found the sleep command (exactlly what I was looking for) in the Windows 2003 server resource kit
0
 
amelbguyDirectorCommented:
Some online (sorry author can't remember location) gave this tidbit which was to insert a "ping" to an invalid host and set the wait time for the period you wish to wait.

e.g. PING 1.1.1.1 -n 1 -w 60000 >NUL

Smart thinking (outside the box).
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.