CLI workaround for Windows XP : Doing a pause in a batch script

DOS - Windows Batch Files, Tips Add comments

In our list of “CLI workaround for Windows XP“, a missing command is SLEEP or WAIT. For fixing this I suggest you two solution, first is simply a batch workaround using PING command, the second solution use the Windows Server 2003 Ressource Kit tools.

With PING you can produce a fixed delay by testing the loopback address. This can be really usefull if you don’t want (or if you can’t) install extra software.

# Doing an approximative pause of 60 seconds

PING -n 61 127.0.0.1>nul

Second way is to install the Windows Server 2003 Resource Kit tools from microsoft.com. You will get a SLEEP.exe that will do all the requested stuff.

# Doing a pause of 60 seconds

SLEEP 60

Enjoy. ;-)

Share this post with your network :These icons link to social bookmarking sites where readers can share and discover new web pages.
  • blinkbits
  • BlinkList
  • blogmarks
  • co.mments
  • connotea
  • del.icio.us
  • De.lirio.us
  • digg
  • Fark
  • feedmelinks
  • Furl
  • LinkaGoGo
  • Ma.gnolia
  • NewsVine
  • Netvouz
  • RawSugar
  • Reddit
  • scuttle
  • Shadows
  • Simpy
  • Smarking
  • Spurl
  • TailRank
  • Wists
  • YahooMyWeb

One Response to “CLI workaround for Windows XP : Doing a pause in a batch script”

  1. Leo Says:

    Another way is to use ‘timeout’ command.
    Just type ‘timeout’ at the command line and it will display the help.
    I don’t know since when is it available, but at least is available on Vista.

Leave a Reply

WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Login