5

I have some photos taken in 2012 and when I export them as originals to a folder they have a creation date of July 2016. Running an EXIF detailer showed the images to have been taken in 2012, so why does Photos export them and add another date to it?

I tried exporting my whole album from 2009-2016 and noticed some pictures taken in years prior to 2016 to appear in July or other months of this year as well.

I would really appreciate if someone can shed some light on this issue.

  • Granted I am not using Sierra, but I just tested exporting a photo from 2012 (using Export Unmodified Originals). Finder shows the file as having a created date in 2012, and File Viewer shows the EXIF date is intact as well. See this question on the Photography SE for ways to change file creation dates to the embedded EXIF date. – tubedogg Oct 11 '16 at 20:32
  • That said, I wouldn't rely on the file creation date to mean anything. It can be changed for various reasons (copying files will result in a creation date of the date of the copy, for example). – tubedogg Oct 11 '16 at 20:35
  • @tubedogg It works perfectly, but not for videos, have you heard of a tool that does the same for videos by any chance? – Render Oct 13 '16 at 17:09
6

Note that, in order for your files to have a created date that matches the EXIF "photo taken" date, you must use Export Unmodified Originals. Modified images may have been edited within Photos which results in a new file being created, and using the normal Export will export that modified file with the later creation date.

There are some options in this post on Photography SE for changing a file's creation date to match EXIF data. You should never attempt to use these on files within the .photoslibrary bundle! Export your files first.

ExifTool is a very powerful command-line application for reading and writing EXIF data in a variety of files, including videos. However, on Macs, it cannot write the file creation date. There's a way around that using a bit of bash scripting.

Here's a command that will work for both photo and video files:

for file in *; do SetFile -d "$(exiftool -p '$CreateDate' -d '%m/%d/%Y %H:%M:%S' "$file")" "$file"; done

Essentially a loop is run over files in the current directory. exiftool is used to read the EXIF creation date tag, and SetFile is used to write as the file's creation date. The way it is written, it will affect all files in the current directory, so I suggest you move all files that you wanted modified into a directory with nothing else in it, and run the command from that directory.

  • That link you posted was exceptionally helpful, just need to find a way to do the same for videos. – Render Oct 13 '16 at 17:40
  • See my updated answer. – tubedogg Oct 13 '16 at 18:55
1

in case you would like to use touch instead of SetFile:

for file in *; do touch -mt "$(exiftool -p '$CreateDate' -d '%Y%m%d%H%M.%S' "$file")" "$file"; done
1

The accepted answer assumes one knows how to use the command line. If you do not, here are the assumed precursor steps:

1) Install a package manager, if you don't have one installed already. (And then use it forever to install new software :))

(Recommended:)

For Mac: use Homebrew - https://brew.sh/

For Windows: use Chocolatey - https://chocolatey.org/

2) Using your (^^ newly installed) package manager, install exiftool, which is free software for viewing/working with media metadata:

On Mac:

brew install exiftool

On Windows:

choco install exiftool

3) Navigate to the directory containing your image/movie files by using the 'change directory' command: cd - (Read more about how to use the command line here: https://www.digitalcitizen.life/command-prompt-how-use-basic-commands)

cd {insert-name-of-your-file-directory-here}

4) The last command is based on the above accepted answer(s), but I found that I needed to switch this to CreationDate for it to actually reflect the original photos'/videos' capture date. And I also opted for using touch:

One-liner version (copy and paste this):

for file in *; do touch -t "$(exiftool -p '$CreationDate' -d '%Y%m%d%H%M' "$file")" "$file"; done

(Same code, but formatted for readability in case you want to understand what is happening):

for file in *; do   \
    touch -t "$(exiftool -p '$CreationDate' -d '%Y%m%d%H%M' "$file")" "$file";   \
done
  • Can you install exiftool without installing the brew package manager? What if someone uses another package manager such as fink? – fd0 Sep 25 '18 at 10:24
  • Yeah, of course. However you want to install it! – Daniel Schofield Sep 27 '18 at 11:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .