fixing the date

Started by fpefpe, May 05, 2025, 02:39:54 PM

Previous topic - Next topic

fpefpe

I just  copied the files from my camera's sd card to the computer -- and realized that the  date/time of the image file was not correct -- the date / time on the camera was not correctly set ---

I used windows to correct the date/time of the files  when on the computer ---  I recall that there are  command line switches to  use the  file's date/time to update the  date / time metadata of the jpeg using the file's date/time ---  what would be that option?  Thanks

Phil Harvey

I think this may do what you are asking:

exiftool "-alldates<filemodifydate" -P DIR

This will update the EXIF DateTimeOriginal, CreateDate and ModifyDate from the filesystem last-modified time.  The -P option preserves the filesystem last-modified time instead of setting it to the current time when updating the 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 ($).

StarGeek

I would suggest double-checking with exiftool to see what the value of all the time tags are with this command
exiftool -time:all -G1 -a -s /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