Pause and delay batch files, with Sleep

Sleep is a free utility that will help you give to your batch file a sleep command, in order to pause the execution of batch commands, letting your batch file sleep for a given number of seconds.

Sleep is similar to the sleep.exe included with the Windows Resource Kit, but here you don’t need to download and install the entire kit! You can integrate Sleep into batch files and scripts to pause the execution of a batch file for a specified period of time.

Here is an example of the usage of sleep. This will run Sleep from a specified directory, make your batch file sleep for 30 seconds, and then let it continue to the next command:

start /wait "" "c:\any directory\Sleep.exe" 30

Note that, if you prefer not to use a separate utility, you can achieve the same function with the native Windows TIMEOUT command. For example, TIMEOUT /T 2 inserts a 2 seconds delay until your batch file proceeds to the next command. You can also add a NOBRAKE parameter for key presses to be ignored, in which case sleep time will be uninterrupted (e.g. TIMEOUT /T 2 /NOBREAK). Enjoy!

Download Sleep