Skip to main content
areohbee
Legend
July 28, 2010
Question

Harnessing ExifTool Output

  • July 28, 2010
  • 1 reply
  • 676 views

Anybody made any progress in this, or know of anybody whose made any progress in this, that they'd be willing to share.

Or in general, generic harnessing of ouput from command line tools...

Thanks,

Rob

This topic has been closed for replies.

1 reply

johnrellis
Legend
July 28, 2010

I capture the output of some command-line programs by redirecting their output to a temp file and then reading the temp file.  That seems to be portable between Windows and Mac (though I haven't tested it yet with Mac).   Exiftool uses standard error as well as standard out, so to capture both in the same file, you'll need to do something like:

exiftool ... > output.log 2>&1

The "2>&1" supposedly has to go last on the command line on Windows.

I looked into capturing the output of Exiftool using the -X option, which writes XML output, and then using the SDK's LrXml to read it.  But I ended up not needing to go that route and don't have any meaninful experience to report.

areohbee
areohbeeAuthor
Legend
July 28, 2010

Thanks John - I guess that will do the trick.

R