Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

creating a batch file that pauses for 5 seconds

Status
Not open for further replies.

at51178

Technical User
Mar 25, 2002
587
US
I am running windows 2k pro

I would like to create a batch file that will pause for 5 seconds after the first job and then move on to the next job and waith another 5 seconds.

can this be done I have been looking everywhere on the net.
please let mw know if this can be done thanks.
 
The Win2K Resource Kit comes with a small EXE called SLEEP.EXE. It's defined as: Batch File Wait in the resource kit. Simply put the EXE in the same folder as your batch file and add the command SLEEP.EXE <number of seconds> in your batch file.

You can also find 3rd party tools. I found one called WAIT32.EXE that you can get here:





&quot;In space, nobody can hear you click...&quot;
 
Is there a way where I could manually write it in my batch file I am kind of locked down on the network so I am limited to the things that I could do to the pc.
 
If you can write and save a batch file, you can use the sleep.exe... but seeing I don't know your needs, I cannot argue it.

2 things I can think that you could do:

A) Add a PAUSE after the lines, but that would mean manually hitting a key to continue the process.

B) Add commands that have the system do something that takes time, like a DIR of the I386 folder. Do it 3 or 4 times and it will take the system 3 or 4 minutes to do them all.



&quot;In space, nobody can hear you click...&quot;
 
Thanks for your response

I tried your second choice and it seems to work fine.
 
delay 5 seconds:

ping 127.0.0.1 -n 1 -w 5000 > nul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top