Discussion Locked

Pause In A .BAT file

0 helpful
13 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
How do I make a pause of 10 seconds in a .bat file?

13 replies

by q2ggirl

The pause command for DOS when put into a bat file this will stop the batch file until you press any key to continue.

You cannot set it to timeout for any automated time. You user will be prompted to press a key to continue implementing the batch file.

You can read more about using the command at this URL:
http://www.computerhope.com/pausehlp.htm#04

by nettek

You can use sleep.exe, as mentioned above, but that is not a standard command. It must be added from the NT resource kit.

The following command will work in a typical Windows batch file:

TYPE NUL | CHOICE.COM /N /CY /TY,10

(The vertical line is located above the Enter key on my keyboard)

by brian

This is not as precise but doesn't require any extras.

I have heard of adding a ping. Why not add however many you need to get 10 seconds. (2 or 3)

by joseph moore

I agree with the SLEEP.EXE recommendation. That is what I use in my logon scripts. It does the same function as the WAIT command does in Netware.
So, find a copy of SLEEP.EXE, download it, and put in in the Netlogon share on your PDC/BDCs.
Then inyour logon scripts, just put in:

SLEEP 10

That's it.

BTW, I found a downloadable copy of Sleep here:
http://home.t-online.de/home/UHerrmann/download.htm
(please remove any spaces)

Hope this helps.

This discussion is closed to new replies.