Batch mark files with different date values

Started by grole, January 15, 2017, 09:37:00 AM

Previous topic - Next topic

grole

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!

StarGeek

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.

"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

grole

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.


StarGeek

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.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype