ExifTool Forum

General => Other Discussion => Topic started by: JanK on October 23, 2012, 11:50:10 AM

Title: OSX: Find files with "Create Date" is not equal to "FileModifyDate"
Post by: JanK on October 23, 2012, 11:50:10 AM
Hi!

Yes topic says all.
How can I find files with "Create Date" is not equal to "FileModifyDate"? Or maybe "Create Date" is not equal to "DateTimeOriginal"?
Title: Re: OSX: Find files with "Create Date" is not equal to "FileModifyDate"
Post by: Phil Harvey on October 23, 2012, 11:59:01 AM
exiftool -aaa -if '$filemodifydate ne $createdate' -r DIR

Where DIR is the name of a directory containing your images.

Here I pull trick of requesting a non-existent tag ("aaa") so there will be no output other than the name of the file being processed (plus warnings and such).

(Windows users: Use double quotes instead of single.)

- Phil
Title: Re: OSX: Find files with "Create Date" is not equal to "FileModifyDate"
Post by: Phil Harvey on October 23, 2012, 12:03:06 PM
Hmmm.  I just realized that the time zone of FileModifyDate messes up this test.  Darn.  Gotta get more creative:

exiftool -aaa -if 'substr($filemodifydate,0,19) ne $createdate' -r DIR

This compares just the first 19 characters of FileModifyDate.

- Phil

Edit: I suppose that I could have also done this with the -d option:

exiftool -aaa -if '$filemodifydate ne $createdate' -d "%Y:%m:%d %H:%M:%S" -r DIR
Title: Re: OSX: Find files with "Create Date" is not equal to "FileModifyDate"
Post by: JanK on October 23, 2012, 03:06:40 PM
Sorry I missed to say that I mean System Create Date from OSX. Not the Meta CreateDate.
That's why I write this in the "Other Discussion".

I updated all my system "Created Date" to match FilemodifyDate which match DateTimeOriginal. To see if I missed no file I want to check this.
Title: Re: OSX: Find files with "Create Date" is not equal to "FileModifyDate"
Post by: Phil Harvey on October 24, 2012, 07:18:42 AM
Sorry, ExifTool can not yet read the filesystem creation date of a file.

- Phil

Edit:  As of version 10.08, ExifTool can read this filesystem information on OSX.  (Add -requestall to the command, or request the "-mditem*" tags.)