Hi, I need to use two different date formats in a call. Example:
exiftool -ext jpg -m -d "%y%m%d-%H%M%S" -overwrite_original_in_place \
'-UserComment<(c) ekkidee $createDate' \
'-ImageUniqueID<dateTimeOriginal' \
'-FileModifyDate<dateTimeOriginal' \
$arglist
This clip sets a user comment to a copyright string, and establishes a unique ID to a timestamp. It also resets the file's timestamp.
The first occurrence ($createDate) should be four-digit year only: %Y
The second and third occurrences (dateTimeOriginal) are in the form indicated on the command line: %y%m%d-%H%M%S
The command above works fine as given, but the copyright string is wrong. I am wondering if I can somehow force a full four-digit year when $createDate is referenced, or if there is another source for the year. I tried coding two separate -d parms but only the second one was observed. Obviously, two separate command line calls will also work.
Thanks!
For the first one, use the DateFmt feature from Advanced Formatting:
'-UserComment<(c) ekkidee ${createDate#;DateFmt("%Y")}'
Ha I was just looking into that. Thanks for your help!
ETA ... works like a charm ... have to say this is a sweet tool.