ExifTool Forum

General => Metadata => Topic started by: Henrik Jordahn on March 07, 2011, 05:04:26 AM

Title: Edit UserComment with year from CreateDate?
Post by: Henrik Jordahn on March 07, 2011, 05:04:26 AM
In trying to organize all my photos, I would also like to modify the UserComment to display the correct year for the copyright.
Some files have the wrong year until some time in January when I usually remember to change the text in the camera.

This command changes the usercomment nicely, but is it possible to extract the year from the file instead of having to run the command on the folder for a given year each time?

exiftool '-usercomment=COPYRIGHT Henrik Jordahn 2009 henrik@jordahn.dk' /media/_SatorSquare/test6/



EDIT:
Yes there is, this seems to work nicely for me:

exiftool '-usercomment<createdate' -d 'COPYRIGHT Henrik Jordahn %Y henrik@jordahn.dk' /media/_SatorSquare/test6/
Title: Re: Edit UserComment with year from CreateDate?
Post by: Phil Harvey on March 07, 2011, 07:28:59 AM
You seem to have found a solution.  You can add the following -if condition to only modify files with the wrong date:

-if '$userComment=~/2010/ and $createdate=~/2011/'

- Phil