Client Management Suite

 View Only

Waits for a specified amount of time in a batch file 

Apr 30, 2009 08:21 AM

Sometime in a batch file you need to wait to ensure that enough time is given for some operations to complete (installation, configuration, etc.)

There are some ways and tricks to put a pause, if you have a specific time a good solution is use the Sleep.exe utility.

This utility is available with the Windows Server 2003 Resource Kit Tools .  Useful in batch files, Sleep.exe waits for a specified amount of time.

Usage:


sleep time-to-sleep-in-seconds
sleep [-m] time-to-sleep-in-milliseconds
sleep [-c] commited-memory ratio (1%-100%)

Example :
sleep 5 ( waits for 5 seconds )

Link : Windows Server 2003 Resource Kit Tools

Statistics
0 Favorited
1 Views
0 Files
0 Shares
0 Downloads

Tags and Keywords

Comments

May 04, 2009 06:13 AM

It is very useful for me. Thanks Screenbert.

Apr 30, 2009 10:11 AM

If you want something that can work with any windows OS you can also use this command

ping 127.0.0.1 -n 1 -w 1000 >nul

just replace the 1 in the  "-n 1"  with the number of seconds you want to wait.

Related Entries and Links

No Related Resource entered.