Windows batch: sleep

Claudiu picture Claudiu · Nov 30, 2010 · Viewed 195k times · Source

How do I get a Windows batch script to wait a few seconds?

sleep and wait don't seem to work (unrecognized command).

Answer

tenfour picture tenfour · Nov 30, 2010

You can try

ping -n XXX 127.0.0.1 >nul

where XXX is the number of seconds to wait, plus one.