Unofficial archive. This is a read-only, community-run archive of the Apple Support Community. It is not affiliated with or endorsed by Apple Inc.

changing the modified date automatically to creation date

I have thousands of files that I have exported from Photos on my Macbook Pro. The problem is that the modified date has changed to the date I exported them. How can automatically change the modified date back to the created date. I need to do this automatically because there are too many photos to change individually.

9 replies

rrtodd99 wrote:

for every file, the first of the script would extract the creation date of the file and then pipe that value into the next part of the script which would update the modify date.


The following commands copy internal metadata date to file creation & modification dates but you can modify it to copy any date to any other date. First test with copies.


Copy image internal metadata dates to file system creation and modification dates can be done in exiftool with:


exiftool -m -overwrite_original -ext jpg -ext heic -ext png -ext webp -ext avif '-FileCreateDate<ExifIFD:DateTimeOriginal' '-FileModifyDate<ExifIFD:DateTimeOriginal' .


Copy movie internal metadata dates to file system creation and modification dates can be done in exiftool with:


exiftool -m -overwrite_original -ext mp4 -ext m4v -ext mov -api LargeFileSupport=1 -api QuickTimeUTC=1 '-FileCreateDate<QuickTime:CreateDate' '-FileModifyDate<QuickTime:CreateDate' .


Dates can be checked with:


exiftool -a -G1 -s -fileOrder5 FileName -api LargeFileSupport=1 -api QuickTimeUTC=1 -FileCreateDate -Time:All .


The Finder is a File Management system and, as you would expect, it shows file dates-- the file creation date and the file modified date. Photos is an Image Management system and, like Preview or Lightroom, or pretty much any image viewer, it shows the image creation date, and other image data. So the image dates are still there, they just aren't a concern of Finder.


The date is stored in the Exif metadata. You can inspect the metadata with the free app "ExifTool Reader," available at the App Store.


The File dates can be changed to Image dates, if you're sure that's what you want. You will be removing data rather than adding data. There are metadata editors at the App Store, but I haven't used them-- they are free to load for testing, but they have the notorious "in-app purchases." They're probably worth checking out. I can't recommend one, because to change the Exif metadata I use the 3rd party GraphicConverter ($40.) It'd be rather expensive just for changing metadata, but it does a lot more, and I've used it for 35 years(!)



rrtodd99 wrote: …advance expertise in scripting

As I said, I use GraphicConverter which will copy the image date to the file date as a batch operation.


I should've exported the "unmodified" photo initially,

This would not include edits, crops, or comments. It just depends on what you want. Of course, you can do that now…


I was hoping that someone who had advance expertise in scripting could come up with a solution. i.e. for every file, the first of the script would extract the creation date of the file and then pipe that value into the next part of the script which would update the modify date.

One more note regarding my problem. I realized the error of my ways in how I exported my photos from Macbook Photos, I should've exported the "unmodified" photo initially, as this would've maintained the original date stamps. But since I exported all my photos (several thousand of them) already and imported them back into a new Macbook Pro, the die was cast and they all have the modified date of when I exported them.

rrtodd99 wrote:

Thanks Richard, I downloaded the GraphicConverter and trying it out now. It looks like an amazingly comprehensive app.


Since it has been around since 1992, it had better be. Even adding 1 feature per year would make it pretty full-featured by now.

Thanks Richard, I downloaded the GraphicConverter and trying it out now. It looks like an amazingly comprehensive app.

I find GC intimidating, sometimes, even after having used it for so long. Luckily there is extensive documentation. And Thorsten Lemke is very responsive to questions.

Thanks Matti! 😎