Hello,
Could someone tell me what I could use to batch compare different date fields in all files of a directory and it's subdirectories, and if a difference is found, mark the file?
I want to compare mainly -datetimeoriginal and -createdate for deviations, as some software looks at the one, some the other.
If it could add some value to -title, for example, I could filter by this and later remove it.
Thanks!
I'm a little confused by your question. Are you trying to compare the date fields between different files or just within the same file?
If it's within the same file, try
exiftool -if "$DateTimeOriginal ne $CreateDate" -Title="Timestamp discrepancy" -r FileOrDir
-r will recurse through subdirectories. Replace FileOrDir with the files and/or directories you wish to process.
If you want to compare more than two time stamps, you'll have to either create more complex -if statements, run multiple exiftool commands, or create a user-defined tag.
Thanks for that, I'll give it a try. I was indeed talking about within each file, sorry for not being clear.
For whatever reason, I've seen some files with different time/dates.
I think I'd just run another command to compare a third field to the first. But I'll keep the option in mind.
Quote from: grole on January 15, 2017, 03:58:01 PM
For whatever reason, I've seen some files with different time/dates.
The most likely reason for that is bad programming on someones part. But there are legitimate reasons for differences.
For digital cameras, the two value should be the same. But if you were scanning a picture, the date that the picture was taken (DateTimeOriginal) and the date the picture file was created (CreateDate) would be different. But that's far more precision than most people would care to deal with.