Batch Timeout /nobreak constant response

7,107

You can redirect the command's output to the Nul device like this:

TIMEOUT 1 /NOBREAK >NUL

For most commands, adding >nul to the end of the command will redirect the command's standard output to the Nul device which simply discards the output. Some output, particularly error output will still be written to the screen.

If you'd like to pause indefinitely, use:

PAUSE >NUL

Or can go one step further and provide a custom message:

ECHO Press your favorite key to continue...
PAUSE >NUL
Share:
7,107

Related videos on Youtube

Xaxis
Author by

Xaxis

Fighting The Tyranny with its own medicine.

Updated on September 18, 2022

Comments

  • Xaxis
    Xaxis over 1 year

    How do I get my batch file to use timeout /nobreak without displaying in the program "waiting for one seconds, press CTRL+C to quit"?