Don’t use a redirection operator, which is what “>” is.
All programs have three streams:
- Standard Input (the input from the console)
- Standard Output (general logging/UI output to the console)
- Standard Error (logging/UI output to the console meant for error messages or other exceptional behavior)
command >nul
^ This says to pipe the standard-output stream to null.
command 2>nul
^ This says to pipe the standard-error stream to null.
command 2>&1
^ This says to pipe the standard-error stream to the same place as the standard-output stream.