ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: OngL on March 29, 2013, 09:46:57 PM

Title: Sync Date command
Post by: OngL on March 29, 2013, 09:46:57 PM
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.
Title: Re: Sync Date command
Post by: Phil Harvey on March 30, 2013, 08:27:04 AM
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 (https://exiftool.org/TagNames/Extra.html) for more information about the file creation date on OS X.

- Phil