to create 2 logs of my batch. 1 for erros, 1 for anything else
let's pretend that this is my batch called test.bat:
REM Hello
REM Are you ready to keep on being logged?
Pause
REM I thought you were!
Ekko
notice the flawed "command" on the last line for which i'd expect an entry in testerrors.txt.
however, when i use said command, i do not see the execution of the batch in my console (although it IS being executed). i can press "any key" to end the pause but i don't see _anything_ in my console window - like being in the dark.
the logs are created exactly as i expect - but i wanna still see my batch running in console so i know if i can really end the pause without looking into the txt file manually.
how can i get my 2 logs and STILL see my execution running?
How to log the results of a DOS batch file?
in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
Posted · Edited by tgf666
i guess i wanna use something like:
test.bat > testlog.txt 2> testerrors.txt
to create 2 logs of my batch. 1 for erros, 1 for anything else
let's pretend that this is my batch called test.bat:
REM Hello
REM Are you ready to keep on being logged?
Pause
REM I thought you were!
Ekko
notice the flawed "command" on the last line for which i'd expect an entry in testerrors.txt.
however, when i use said command, i do not see the execution of the batch in my console (although it IS being executed). i can press "any key" to end the pause but i don't see _anything_ in my console window - like being in the dark.
the logs are created exactly as i expect - but i wanna still see my batch running in console so i know if i can really end the pause without looking into the txt file manually.
how can i get my 2 logs and STILL see my execution running?