Difference between revisions of "Exiftool commands"

From OpenMedia
Jump to: navigation, search
m (+Category)
Line 4: Line 4:
  
 
* Retrieve metadata as xml: One file per image: '''exiftool -X -w xml C:\test''' or write to console:  '''exiftool -X C:\test'''
 
* Retrieve metadata as xml: One file per image: '''exiftool -X -w xml C:\test''' or write to console:  '''exiftool -X C:\test'''
* Write a copyright notice to all files: '''exiftool -CopyrightNotice="(c) Creators & XYZ.org; Lizenz: Creative Commons cc-by-sa 3.0 Deutschland (http://creativecommons.org/licenses/by-sa/3.0/de/)" -E -overwrite_original_in_place  C:\test\*.jpg'''
+
* Write a copyright notice to all files: '''exiftool -CopyrightNotice="© Creators & XYZ.org; Lizenz: Creative Commons cc-by-sa 3.0 Deutschland (http://creativecommons.org/licenses/by-sa/3.0/de/)" -E -overwrite_original_in_place  C:\test\*.jpg'''
 
** "-E" allows to use html-entity encoding (default EXIF is UTF8, but default IPTC LATIN/ANSI!)
 
** "-E" allows to use html-entity encoding (default EXIF is UTF8, but default IPTC LATIN/ANSI!)
 
** "-overwrite_original_in_place" prevents creation of original-file backups (rather copy folder for testing...)
 
** "-overwrite_original_in_place" prevents creation of original-file backups (rather copy folder for testing...)
* Write tag value only IF NOT YET PRESENT: '''exiftool -comment-= -comment='new comment' a.jpg'''. MAYBE HAVE A BLANK AFTER "-="!  
+
* Write tag value only IF NOT YET PRESENT: '''exiftool -comment-= -comment='new comment' a.jpg'''. MAYBE HAVE A BLANK AFTER "-="! '''
** Examples for creators: '''exiftool -By-Line-= -By-Line="X. Bürr & A. Baar" -E -overwrite_original_in_place C:\test\*.jpg
+
** Examples for creators: '''exiftool -By-Line-= -By-Line="X. Bürr & A. Baar" -E -overwrite_original_in_place C:\test\*.jpg'''
 +
** Examples for combined: '''exiftool -By-Line="X & Y" -CopyrightNotice="© Creators; Lizenz: Creative Commons cc-by-sa 3.0 (http://creativecommons.org/licenses/by-sa/3.0/de/) or later" -keywords="XXXX" -credit="XXX AUTHOR XXX" -E -overwrite_original_in_place C:\test\*.jpg'''
 +
 
 +
 
  
 
<!-- HELP FILE by default not searchable and in pages, here extracted from command line output:
 
<!-- HELP FILE by default not searchable and in pages, here extracted from command line output:

Revision as of 17:38, 14 May 2010

Exiftool is a powerful tool to read and write metadata from/to images. It not only supports EXIF, but also IPTC, XMP and other metadata containers.

Exiftool is rather complicated to use, with 100s of command line options, here we collect some solutions we have previously used.

  • Retrieve metadata as xml: One file per image: exiftool -X -w xml C:\test or write to console: exiftool -X C:\test
  • Write a copyright notice to all files: exiftool -CopyrightNotice="© Creators & XYZ.org; Lizenz: Creative Commons cc-by-sa 3.0 Deutschland (http://creativecommons.org/licenses/by-sa/3.0/de/)" -E -overwrite_original_in_place C:\test\*.jpg
    • "-E" allows to use html-entity encoding (default EXIF is UTF8, but default IPTC LATIN/ANSI!)
    • "-overwrite_original_in_place" prevents creation of original-file backups (rather copy folder for testing...)
  • Write tag value only IF NOT YET PRESENT: exiftool -comment-= -comment='new comment' a.jpg. MAYBE HAVE A BLANK AFTER "-="!
    • Examples for creators: exiftool -By-Line-= -By-Line="X. Bürr &amp; A. Baar" -E -overwrite_original_in_place C:\test\*.jpg
    • Examples for combined: exiftool -By-Line="X &amp; Y" -CopyrightNotice="&copy; Creators; Lizenz: Creative Commons cc-by-sa 3.0 (http://creativecommons.org/licenses/by-sa/3.0/de/) or later" -keywords="XXXX" -credit="XXX AUTHOR XXX" -E -overwrite_original_in_place C:\test\*.jpg