Change "Date taken" using "Date modified"

Started by sonalaq, January 16, 2023, 11:59:13 AM

Previous topic - Next topic

sonalaq

I have a bunch of pictures with the Date taken blank, the date modified is the date I'd like to put in date taken, been trying a few codes but can't find a solution...

StarGeek

Your command would probably be

exiftool "-PNG:CreationTime<FileModifyDate" /path/to/files/

This is the only tag Windows will read in PNG files. It has no support for any other PNG metadata.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

sonalaq

Quote from: StarGeek on January 16, 2023, 12:06:40 PMYour command would probably be

exiftool "-PNG:CreationTime<FileModifyDate" /path/to/files/

This is the only tag Windows will read in PNG files. It has no support for any other PNG metadata.

Thanks, worked! Now, what should I use for .MOV or .MP4?

sonalaq

Actually, I see the date modified changed to today's date, any way I can have the old date on both modified and taken?

StarGeek

Quote from: sonalaq on January 16, 2023, 12:29:16 PMThanks, worked! Now, what should I use for .MOV or .MP4?

Depends on what property you want to set, since there isn't a "date taken" for videos.  I was assuming Windows and if that's the case, see this post for the list of what tags Windows will read.

You would also want to add the -api QuickTimeUTC option because the most common video time stamps are supposed to be set to UTC and Windows (and Mac Finder) will automatically adjust the time to the local time zone.

Quote from: sonalaq on January 16, 2023, 12:32:30 PMActually, I see the date modified changed to today's date, any way I can have the old date on both modified and taken?

Add the -P (-preserve) option.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).