2 Replies Latest reply on Jul 28, 2010 3:52 PM by johnrellis

    Harnessing ExifTool Output

    areohbee Level 6

      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...




        • 1. Re: Harnessing ExifTool Output
          johnrellis Most Valuable Participant

          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.

          1 person found this helpful
          • 2. Re: Harnessing ExifTool Output
            areohbee Level 6

            Thanks John - I guess that will do the trick.