24 декабря 2018 г.

Setting Apple Photos exported file created and modified times to match capture date using EXIFTool on Mac OS

I exported a few originals from the Mac Photos app. The resulting photos had Date Modified and Date Created set to the time of export. However, the EXIF capture time contained the actual capture time. Need to set file creation and modification times to match the capture time using the EXIF Tool.
exiftool "-DateTimeOriginal>FileModifyDate" /Users/admin/PhotosTest
Few things were confusing to me initially as those don't seem to be clarified in the documentation.
  • DateTimeOriginal actually stands for the capture date
  • FileModifyDate represents not only the Date Modified (file modification time), but also the Date Created (file creation time), though won't change the Date Added time. I'm referring to the Finder column names here.
  • Be careful with AllDates shortcut which you may notice in the docs, as it will alter the original capture date as well, and you'll lose it if you don't have the backup.
P.S. This works both ways: you can swap the parameters to set the EXIF capture date to match the file modification date.
exiftool "-FileModifyDate>DateTimeOriginal" /Users/admin/PhotosTest

Комментариев нет: