Main Menu

Datetimeororiginal

Started by th1000, March 23, 2022, 10:01:26 PM

Previous topic - Next topic

th1000

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.

StarGeek

See this example.  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 for more details.

This command creates backup files.  Add -Overwrite_Original to suppress the creation of backup files.  Add -r to recurse into subdirectories.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

th1000

#2
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. 

StarGeek

Try
exiftool "-FileModifyDate<DateTimeOriginal" /path/to/files/
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

th1000

#4
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

Phil Harvey

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
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).