Redirect Console output to File

Started by Archive, May 12, 2010, 08:54:42 AM

Previous topic - Next topic

Archive

[Originally posted by mikeyabc on 2009-11-20 07:39:35-08]

Hi,

what option is there to make ExifTool to write ALL MESSAGES to a FILE instead of the CONSOLE (in WinXP) ? And I mean the current (processing) messages, NOT the EXIF data.

I tried piping :
Code:
exiftool -r <other options here..> C:\Pictures > Logfile.txt

but it didn't seem to work.

TIA

Mikey

Archive

[Originally posted by exiftool on 2009-11-20 11:21:32-08]

Hi Mikey,

You got it right.  That should work.

adding "> out.txt" to the end of any command will pipe
the console output to the file "out.txt" in the current
directory.

Can you be more specific?  What didn't work?  Did
the output still go to the console, or was it just that
you couldn't find the output .txt file?

- Phil

Archive

[Originally posted by mikeyabc on 2009-11-22 19:15:34-08]

Hi Phil,

I'm only getting this BS in the file :    
    1 directories scanned
   32 image files updated
    1 image files unchanged

But all the warnings and IMPORTANT messages are still output only to the console. Well in a OS command etc., piping IS PIPING ! You don't get anything on the screen anymore ! :-)
What SHALL I DO Huh

Thanx,

Mike

(Actually, not SO desperate, but still...)

Archive

[Originally posted by exiftool on 2009-11-22 20:51:43-08]

Hi Mike,

Ah, so you're talking about the error/warning
output which goes to STDERR, but the redirection
only redirects the standard output (STDOUT).
In some shells (on Mac and Linux), you can send
STDERR to the same place as STDOUT by adding
"2>&1" to the end of the command, but I don't
know how to do this on Windows.

Perhaps with a bit of goggling you can figure out
how to do this.  (Unless you get unlucky and the
Windows console doesn't have this ability.)

- Phil

Archive

[Originally posted by jean on 2009-11-23 05:22:39-08]

Hello

Windows syntax:

to redirect to a text file:

exiftool my_file.jpg 2>infos.txt

to redirect stderr:

exiftool my_file.jpg 1>erreurs.txt

Archive

[Originally posted by mikeyabc on 2009-11-23 07:08:34-08]

Thanks everybody for your answers. Phil, I'll be doing some googling now.

Mike

Archive

[Originally posted by davitof on 2009-11-23 07:32:11-08]

Very interesting, jean. I wish there was a list of "console" changes between Windows versions.

Archive

[Originally posted by mikeyabc on 2009-11-23 15:42:17-08]

Code:

Yep, WinXP accepts the 2>&1 "thing". Thanks Phil, I tried it and IT WORKED!

And apologies, I didn't see Jean's 1s and 2s - it's NOT the same command.

But Phil's is THE solution (gets all messages into ONE file).

Regards,

Mike(y)