ExifTool Forum

ExifTool => Newbies => Topic started by: boombass on July 24, 2017, 04:12:57 PM

Title: do not change "Date Modified" or "Date Created" on Mac
Post by: boombass on July 24, 2017, 04:12:57 PM
I am using this command to adjust createdate on my .mov files so that Google Photos will put them in the correct chronological order:

exiftool '-createdate<creationdate' -if '($filetype eq "MOV")' <dir>

It works well, but it makes a copy of the original files, and the newly modified versions have "Date Modified" and "Date Created" values of the time the new file was created.

How can I change my command so that new files are not created? I always work on copies and I would rather the "Date Modified" and "Date Created" values didn't change.

Thanks!
Title: Re: do not change "Date Modified" or "Date Created" on Mac
Post by: StarGeek on July 24, 2017, 08:20:30 PM
Add -P (http://www.exiftool.org/exiftool_pod.html#P--preserve) to the command to prevent change of the Date Modified.  On Mac, you'll need to add -overwrite_original_in_place (https://exiftool.org/exiftool_pod.html#overwrite_original_in_place) to prevent change to the Date Created, though you won't get a backup file if you do.  You may not need to keep the the Date Created for Google photos, though.
Title: Re: do not change "Date Modified" or "Date Created" on Mac
Post by: boombass on July 25, 2017, 10:50:45 AM
Thank you! This worked perfectly, and takes a step out of my workflow. Much appreciated!
Title: Re: do not change "Date Modified" or "Date Created" on Mac
Post by: Phil Harvey on July 25, 2017, 11:10:13 AM
On Mac, here is an alternative way to preserve the file system creation date/time which allows you to keep the "_original" backups:

exiftool -tagsfromfile @ -mditemfscreationdate ...

And add -P to also preserve the file system modification date/time.

- Phil