Hi, could you please tell me the exiftool command to populate the FileModifyDate, FileCreateDate, DateTimeOriginal, CreateDate and ModifyDate (-alldates) tags for a file named like 20160825_180532.jpg ? Use of -overwrite_original is fine.
Many thanks!
exiftool "-alldates<filename" "-filemodifydate<filename" "-filecreatedate<filename" FILE
- Phil
Many thanks Phil - I was waaaay overthinking it! :)
Yes. ExifTool applies some smarts when writing date/time values (see FAQ 5 (https://exiftool.org/faq.html#Q5)).
- Phil
Thanks again.
I assume the exact same command would work if the same named files had prefixes of IMG_ for example yes?
Yes. All you need is the 14 numbers for the full date/time in the correct sequence without any numbers preceding them. All other characters will be ignored.
Many thanks again!
If I wish to recursively scan sub folders I can add -r. How do I make it only consider jpg files?
-r pathname/*.jpg isn't quite right.
Use the -ext (-extension) option (https://exiftool.org/exiftool_pod.html#ext-EXT---ext-EXT--extension).