How to pause a batchfile (or make a batchfile wait)
by naisan on Jan.28, 2010, under Uncategorized
How to make a batchfile wait or pause? I see many people propose a vbs or c++ program, but this is the easiest way to make a batchfile pause:
Use the TIMEOUT DOS command timeout to make the bacth file wait. For example “TIMEOUT /T 3600″ inserted into your batchfiles will pause for 3600 seconds, or 30 minutes. A user can override this, but if you use the /NOBREAK parameter it will ignore a keypress. If you want it to wait for a keypress indefinately, use the /T -1 setting (wait forever) without the /NOBREAK.
So, to make your batchfile wait for 10 minutes, and ignore keypresses, add in this line:
TIMEOUT /T 600 /NOBREAK
Leave a Reply
You must be logged in to post a comment.







