From Windows 7 and onwards (or if you install some Resource Kits), you will be given the useful utility timeout to delay the execution (to be used in a batch file) for a few seconds/minutes (optionally until a key is pressed, or Ctrl+C is triggered if command line switch is given: /NOBREAK)
The well known alternative might be to use ping -n 3 127.0.0.1 > nul to pause for 3 seconds using local loop network ping, the output is redirected to NUL so you won’t see any message.
The syntax for timeout is quite simple, it takes /t seconds to delay for a specified period (in seconds) and an optional /NOBREAK disables user keystrokes. The time in seconds can be from -1 to 99999. When it is -1, it is the same as pause that waits for any keypress.
The examples are:
- Timeout /?
- Timeout /T 10
- Timeout /T 300 /NOBREAK
- Timeout /T -1
–EOF (The Ultimate Computing & Technology Blog) —
loading...
Last Post: VBScript Customize IsBlank Function
Next Post: Using Forecast function in excel to predict or calculate a future value along a linear trend by using existing values