How to pause execution for a while in a Windows batch file between a command and the next one?
You can also insert a ping to localhost. This will take 4 seconds to complete (by default). It is considered a kludge by some, but works quite well all the same.
|show 3 more comments|
The correct way to sleep in a batch file is to use the
To wait 30 seconds:
The timeout would get interrupted if the user hits any key; however, the command also accepts the optional switch
Additionally, if you don't want the command to print its countdown on the screen, you can redirect its output to