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.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Check if this do the trick


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.
Can you not use a for loop to delay the process

Active Protection takes the fight to cryptojacking

While there were several headline-grabbing ransomware attacks during in 2017, another big threat started appearing at the same time that didn’t get the same coverage – illicit cryptomining.

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.

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

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

Starts an application and waits for it to end.
Why not do it in the task scheduler?
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


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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
echo finished waiting.
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
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 -n 1 -w 60000 >NUL

Smart thinking (outside the box).
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows XP

From novice to tech pro — start learning today.