I am using the command line below to extract data from files ONLY if their FileModifyDate is newer than 2013-01-21 12:00:00.
The command ran fine, except it did not limit the output by date.
Is there a way to construct the command in order to do this?
LCCmacMini:bin jhaney$ exiftool -T -d "%Y/%m/%d %H:%M:%S" -charset UTF8 -r -f -scanForXMP -fast2 -ext .jpg -ext .png -ext .gif -ext .tif -ext .tiff -ext .psd -ext .pdf -ext .indd -ext .ai -ext .eps -ext .mov -ext .3gp -ext .wmv -ext .flv -FileName -Directory -FileSize# -FileModifyDate -FileCreateDate -FileType -ImageWidth -ImageHeight -Format -ColorMode -Software -ModifyDate -CreatorTool -CreateDate -xmpCreateDate -xmp:DateCreated -xmp:DateTime -xmp:ModifyDate -xmp:MetadataDate -xmp:pdf:CreationDate -xmp:pdf:ModDate -xmp:DocumentID -xmp:InstanceID -xmp:DerivedFromInstanceID -xmp:DerivedFromDocumentID -xmp:OriginalDocumentID -xmp:ManifestReferenceDocumentID -xmpManifestReferenceInstanceID -xmp:CopyrightFlag -xmp:Creator -xmp:Description -xmp:Keywords -xmp:Marked -xmp:CopyrightOwner -xmp:CopyrightOwnerName -xmp:Usage -xmp:xmpRights -xmp:CopyrightStatus -Description -if '$FileModifyDate > 2013-01-21 12:00:00' "/Volumes/Archive/" >> "/Users/jhaney/dateLimitTest.txt"
Yes. Use 'gt' (string compare) instead of '>' (integer compare).
- Phil
I figured it was something like that, but I thought it would be best to post the code in case I was using incorrect syntax or overlooking something else.
Also, looking again at your command, you are also missing quotes around the date/time string. Try this:
-if '$FileModifyDate gt "2013-01-21 12:00:00"'
- Phil
I figured that out before I ran it again. I assumed that a string would need quotes.
Glad I was right.
"Even a blind squirrel finds a nut once in a while!"