El TecnoBaúl de Kiquenet

Kiquenet boring stories

Posts Tagged ‘sleep’

Sleep command in batch file

Posted by kiquenet en 28 enero 2014

On Windows Vista / Windows 7 you can use the timeout command:

timeout /T [delay in seconds] /NOBREAK > NUL

On previous versions of Windows, you can use the ping command (the ping command has 1000 ms of delay between each iteration):

ping -n [delay in seconds + 1] > NUL

Note: As TCP/IP is now ubiquitous, using ping will usually work, but only if TCP/IP is used (a client Windows machine could use NetBEUI or IPX/SPX instead).

Some versions of Windows (like Windows Server 2003) has the sleep.exe executable:

sleep [delay in seconds]

Note: Windows Resource kit for 2003 (http://www.microsoft.com/en-us/download/details.aspx?id=17657) contains sleep.exe command.




Posted in Scripts, Trucos | Etiquetado: , , | Leave a Comment »