ES writes errors to the standard error file.
By default this is the console.
You can hide error messages with:
2>nul
(redirect error output to nothing)
It's useful for the user to see error messages.
Otherwise, they might have a hard time working out why there are no results.
For full control, use a BAT file, disable error output and check the ERRORLEVEL.
Optionally display your own error messages.
will output the if statement to the console.
will not output the if statement to the console.
You should still see ES output.
The error messages might get in the way if you are redirecting to a file or piping to another program.
In this case, disable error output and handle ERRORLEVEL.
By default this is the console.
You can hide error messages with:
2>nul
(redirect error output to nothing)
It's useful for the user to see error messages.
Otherwise, they might have a hard time working out why there are no results.
For full control, use a BAT file, disable error output and check the ERRORLEVEL.
Optionally display your own error messages.
if vs @if
if
@if
You should still see ES output.
The error messages might get in the way if you are redirecting to a file or piping to another program.
In this case, disable error output and handle ERRORLEVEL.
Statistics: Posted by void — Fri Oct 11, 2024 2:16 am