ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: fpefpe on May 05, 2025, 02:39:54 PM

Title: fixing the date
Post by: fpefpe on May 05, 2025, 02:39:54 PM
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
Title: Re: fixing the date
Post by: Phil Harvey on May 05, 2025, 03:34:15 PM
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
Title: Re: fixing the date
Post by: StarGeek on May 05, 2025, 05:05:10 PM
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/