recording output messages

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
 
M

Matthias Tacke

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
 
G

Guest

Hi Matthias,

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

-ck
 
C

Christos Kritikos

hi

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

-ck
 
M

Matthias Tacke

| 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 :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top