I have a question.
When I run a script, I saw DOS showing some error like these
The system cannot find the file specified.
The syntax of the command is incorrect.
But when I check the log file, it did not see any of these errors since I put this run into a log file,
I check some code carefully, did not see any issue...
actually I got the results what I want..
Is this normal? or I should exam all the code?
Thanks
why the log file not showing exactly displayed in DOS prompt screen while running a batch file
Moderator: DosItHelp
Re: why the log file not showing exactly displayed in DOS prompt screen while running a batch file
There are different streams for normal output and error messages. Depending on what you prefer you can redirect them to different log files or merge them into one log file.
E.g.
Steffen
E.g.
Code: Select all
@echo off &setlocal
>"out.log" 2>"err.log" (
dir "|"
)
>"merged.log" 2>&1 (
dir "|"
)
Steffen