Scan for corrupt metadata

Started by warrencalvert, March 18, 2021, 05:24:51 PM

Previous topic - Next topic

warrencalvert

Hi,

I see there's a command that will repair corrupt metadata by (#20 in the FAQ).  However, is there a way to scan all files in folders recursively to get a list of photos that have corrupt metadata?
I'd like to get some idea of how widespread the corrupt metadata is before running a repair.

I guess the next question would be, is it possible to repair corrupt metadata only on files that have corrupt metadata?  I.e. files that are fine I would rather not touch.

Thanks,
Warren.

Phil Harvey

Hi Warren,

It depends on what you call "fine".  Try this:

exiftool -validate -warning -a FILE

Then you could rebuild files that contain warnings, but it isn't guaranteed that all warnings would go away (ExifTool doesn't repair everything).

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

StarGeek

And some of the results may be things you don't want to "fix".  For example
Warning                         : [minor] IPTC Sub-location too long (35 bytes; should be 32 max)

The spec says IPTC:Sub-location should be no more than 32 characters, but this is ignored by nearly every program.  "Fixing" this will truncate the data.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).