ExifTool Forum

ExifTool => Newbies => Topic started by: sonalaq on January 16, 2023, 11:59:13 AM

Title: Change "Date taken" using "Date modified"
Post by: sonalaq on January 16, 2023, 11:59:13 AM
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...
Title: Re: Change "Date taken" using "Date modified"
Post by: StarGeek on January 16, 2023, 12:06:40 PM
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.
Title: Re: Change "Date taken" using "Date modified"
Post by: sonalaq on January 16, 2023, 12:29:16 PM
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?
Title: Re: Change "Date taken" using "Date modified"
Post by: sonalaq on January 16, 2023, 12:32:30 PM
Actually, I see the date modified changed to today's date, any way I can have the old date on both modified and taken?
Title: Re: Change "Date taken" using "Date modified"
Post by: StarGeek on January 16, 2023, 08:34:30 PM
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 (https://exiftool.org/forum/index.php?topic=6591.msg32875#msg32875) for the list of what tags Windows will read.

You would also want to add the -api QuickTimeUTC option (https://exiftool.org/ExifTool.html#QuickTimeUTC) 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 (https://exiftool.org/exiftool_pod.html#P--preserve).