Sync Date command

Started by OngL, March 29, 2013, 09:46:57 PM

Previous topic - Next topic

OngL

I am using Mac and recently migrated all my photos to NAS.  I realize that most my files Creation and Modified are shifted by 1+ year later than the actual date of the photos was taken.

I read the man page but unable to create a working command.  What I'm trying to achieve is:
1) Read EXIF create date and time
2) Write Create and Modified date to match with above.

As my current (corrupted) Create and Modified time are later than the actual photo was taken, both Create and modify date must be changed.

I'm grateful for any pointer for command line to achieve this (hundred thousands of file, recursively).

Thank you in advance.

Phil Harvey

You can set the FileModifyDate in OS X, but you can't set the file creation date directly.  The command looks like this:

exiftool "-filemodifydate<createdate" DIR

(CreateDate from the EXIF)

See the Extra tags documentation for more information about the file creation date on OS X.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).