cmd > file.txt to record an output of a command to a file in Windows!.
Does anybody know how to run a batch script recording the output to a file AND also showing the output on the command prompt as well when executed?
You'll need a Windows-based implementation of
If you don't require output in situ, you can "cheat" by piping the commands, but this is not nearly as useful as following stdout in real-time.
This looks most appealing to me...
The result log will have YYYYMMDD format.
If you want to include time with the log, you can also include this:
p.s. I just noticed that if the time is AM there is a space in the file name, so you will need to wrap mtee log file in double quotes to generate the correct file name.