How do I change the datestamp of each image in a specified directory with their datetimeoriginal?
eg: Photos have a March datestamp yet they were all shot in February.
Thank you.
See this example (https://exiftool.org/exiftool_pod.html#exiftool--DateTimeOriginal--0:0:0-1:30:0-dir). To instead subtract a month, you would use
exiftool -DateTimeOriginal-="0:1:0 0:0:0" /path/to/files/
or you can simplify it by dropping the unneeded parts. Note that when altering year/month/day, you have to include a (space)0 because exiftool will assume you want to edit hours by default
exiftool -DateTimeOriginal-="1:0 0" /path/to/files/
See ExifTool Date/Time Shift Module (https://exiftool.org/Shift.html) for more details.
This command creates backup files. Add -Overwrite_Original (https://exiftool.org/exiftool_pod.html#overwrite_original) to suppress the creation of backup files. Add -r (https://exiftool.org/exiftool_pod.html#r-.--recurse) to recurse into subdirectories.
Thanks for the tip. However my issue is slightly different. It's my fault for not describing my issue better in the first place. Sorry about that. Let me try again.
In File Explorer I can see around 400 images in my "Photo Downloads" folder all filedated 9 March 2022. That date is actually when I downloaded the images from iCloud and NOT the date when the images were taken. Those images were all taken on different days during February 2022. If I select "Date Taken" in File Explorer I can actually the correct February dates. I would like to change the file date with the date when they were taken. So if I understood Exif correctly this would be renaming Filemodifydate with DateTimeOriginal. Thanks for your patience.
Try
exiftool "-FileModifyDate<DateTimeOriginal" /path/to/files/
That worked! Thank you so much.
You solution worked with .jpg and .heic files but not with .png or .mov files.
For the latter I got the message "no writable tags set from "....
Any thoughts?
Thanks
Using CreateDate instead of DateTimeOriginal will work for the MOV files.
For PNG, use this command to see what date/time tags are available and choose one of them:
exiftool -time:all -s FILE
- Phil