How can i write the datetimeoriginal modeified to the iptc JPG keywords field?
For example datetimeoriginal = 2003:10:31 15:44:19
2003 should be added to keywords and 311003 should be added also
how can i do this?
Thanks a lot
Try this:
exiftool -addtagsfromfile @ "-keywords<${datetimeoriginal;s/:.*//}" "-keywords<${datetimeoriginal;s/^\d\d(\d\d):(\d\d):(\d\d).*/$3$2$1/}" DIR
Use +< instead of < if you want to add to existing keywords.
- Phil
Thanks for help. I use fotostation and the comand line is limited so the script is cut at the end
-overwrite_original -addtagsfromfile @ "-keywords+<${datetimeoriginal;s/:.*//}" "-keywords+<${datetimeoriginal;s/^\d\d(\d\d):(\d\d):(\d\d).*/$3$2$1/}"
is cutted to
-overwrite_original -addtagsfromfile @ "-keywords+<${datetimeoriginal;s/:.*//}" "-keywords+<${datetimeoriginal;s/^\d\d(\d\d):(\
Is there a way to abbreviate the script?
Sure.
Make a text file containing this:
-overwrite_original
-addtagsfromfile
@
-keywords+<${datetimeoriginal;s/:.*//}
-keywords+<${datetimeoriginal;s/^\d\d(\d\d):(\d\d):(\d\d).*/$3$2$1/}
and use this fotostation command:
-@ /path/to/your/file.txt
Thanks a lot! Works great!
Sorry, i saw a mistake now.
If i change the date of the picture in the fotostation and then run the script again, it just add the last value, not the correct picture taken date.
Whats wrong?
Thanks
Is Fotostation changing DateTimeOriginal? The command I gave should use the value shown with this:
exiftool -datetimeoriginal FILE
- Phil
my fault. We uses the field DateCreated
i Changed the txt and now it works. thanks