OSX: Find files with "Create Date" is not equal to "FileModifyDate"

Started by JanK, October 23, 2012, 11:50:10 AM

Previous topic - Next topic

JanK

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"?
-Mac OSX Mountain Lion-

Phil Harvey

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
...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 ($).

Phil Harvey

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
...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 ($).

JanK

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.
-Mac OSX Mountain Lion-

Phil Harvey

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.)
...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 ($).