I'm trying to figure out how to show only errors on the console output (and suppress all other output) without redirecting to a file or using TEE, etc. I'm trying to get this to work for single commands in addition to calls to functions (CALL :FunctionName arg1 arg2
).
I feel like an idiot for not being able to figure this out, but I can't find any examples of this online that I can get to work and none of the combinations of redirections I've used have worked.
How do you redirect STDOUT
to >NUL
and at the same time redirect STDERR
to >CON
? Is it just by using >NUL
?
It seems like some error messages appear in the STDOUT stream (e.g. SC query BadServiceName
) depending on how the console app was written. Is that an accurate assessment?