Sunday 2 February 2020

windows - output both stderr and stdout to file, and only stderr to command prompt

When my batch script runs, I want any errors to show up on the command prompt, so the user sees it straight away, while suppressing all the standard output that shows up.


But I want everything to be outputted to a log file. How do I do this?


In other words,


+---------+
| | --- stderr ---------> Console
| Program |
| | --- stdout/err -----> Log file
+---------+

No comments:

Post a Comment

How can I VLOOKUP in multiple Excel documents?

I am trying to VLOOKUP reference data with around 400 seperate Excel files. Is it possible to do this in a quick way rather than doing it m...