Just Hold on a Minute There! – Making a Batch File Wait

I read a fascinating web page today while I was trying to get a batch file I was writing to wait a few seconds before executing its next command. Running off to the net I managed to find the information on Rob van de Woude’s website at http://www.robvanderwoude.com/wait.php.

The way he tackles the problem is to ping an unknown ip address (thus causing an error) and setting that ping to wait a set amount of time before trying again. Having told the command to only attempt the ping once, it will then pass control back to the batch file. Adding insult to injury, even the error message is elegantly sent to “>nul” or nowhere if you like. Brilliant!

I know, I know. Its geeky but just try to remember, this is me writing this! 😀