I wanted to build an awesome place for people to discuss module specific issues, but I don't have any more time for this, and there are much better places to discuss Perl-related issues. I'd recommend asking your question on Stack Overflow or on Perl Monks.
If you are looking for a Perl tutorial or Perl-related news, I hope these links will serve you well.
Posted on 2009-11-20 07:39:35-08 by mikeyabc
Redirect Console output to File
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 :
exiftool -r <other options here..> C:\Pictures > Logfile.txt
but it didn't seem to work. TIA Mikey
Direct Responses: 11789 | Write a response
Posted on 2009-11-20 11:21:32-08 by exiftool in response to 11787
Re: Redirect Console output to File
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
Direct Responses: 11806 | Write a response
Posted on 2009-11-22 19:15:34-08 by mikeyabc in response to 11789
Re: Redirect Console output to File
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 ??? Thanx, Mike (Actually, not SO desperate, but still...)
Direct Responses: 11807 | Write a response
Posted on 2009-11-22 20:51:43-08 by exiftool in response to 11806
Re: Redirect Console output to File
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
Direct Responses: 11808 | 11809 | Write a response
Posted on 2009-11-23 05:22:39-08 by jean in response to 11807
Re: Redirect Console output to File
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
Direct Responses: 11810 | Write a response
Posted on 2009-11-23 07:08:34-08 by mikeyabc in response to 11807
Re: Redirect Console output to File
Thanks everybody for your answers. Phil, I'll be doing some googling now. Mike
Direct Responses: 11815 | Write a response
Posted on 2009-11-23 07:32:11-08 by davitof in response to 11808
Re: Redirect Console output to File
Very interesting, jean. I wish there was a list of "console" changes between Windows versions.
Direct Responses: Write a response
Posted on 2009-11-23 15:42:17-08 by mikeyabc in response to 11809
Re: Redirect Console output to File
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)
Direct Responses: Write a response