recording output messages

  • Thread starter Thread starter Christos Kritikos
  • Start date Start date
C

Christos Kritikos

Hi, I am running a bat files with all commands
redirecting their output to a log file. However I notice
that some commands display a screen message as opposed to
putting it in the log. For instance if I do a

del /f /q junk.txt >> mylog.log

i get a "could not find junk.txt" on the screen but I
don't get anything in the log. Any ideas why?

thanks
christos
 
Christos Kritikos said:
Hi, I am running a bat files with all commands
redirecting their output to a log file. However I notice
that some commands display a screen message as opposed to
putting it in the log. For instance if I do a

del /f /q junk.txt >> mylog.log

i get a "could not find junk.txt" on the screen but I
don't get anything in the log. Any ideas why?
Hello christos.

Yes, some programs use intentionally the error output. To have this also
in your log, include 2>&1

del /f /q junk.txt 2>&1 >>mylog.log

HTH
 
Hi Matthias,

thanks for the info
unfortunately this trick didn't work... :-(
any other suggestions?

-ck
 
hi

thanks for the info
unfortunately this trick didn't work :-(
any other suggestions?

-ck
 
| Hi Matthias,
|
| thanks for the info
| unfortunately this trick didn't work... :-(
| any other suggestions?
|
| -ck

del /f /q junk.txt >>mylog.log 2>&1

reverse the order :-)
 
Back
Top