El TecnoBaúl de Kiquenet

Kiquenet boring stories

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] 127.0.0.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.

Referencias:
http://malektips.com/xp_dos_0002.html

http://stackoverflow.com/questions/7958265/sleep-command-in-batch-file
http://stackoverflow.com/questions/166044/sleeping-in-a-batch-file

Anuncios

Responder

Introduce tus datos o haz clic en un icono para iniciar sesión:

Logo de WordPress.com

Estás comentando usando tu cuenta de WordPress.com. Cerrar sesión / Cambiar )

Imagen de Twitter

Estás comentando usando tu cuenta de Twitter. Cerrar sesión / Cambiar )

Foto de Facebook

Estás comentando usando tu cuenta de Facebook. Cerrar sesión / Cambiar )

Google+ photo

Estás comentando usando tu cuenta de Google+. Cerrar sesión / Cambiar )

Conectando a %s

 
A %d blogueros les gusta esto: