-validate Option

Started by Mac2, March 30, 2019, 03:04:33 PM

Previous topic - Next topic

Mac2

I have just seen a validation feature mentioned in the release notes (I now know that this existed for a while).
I could not find any further documentation for this. So I tried

exiftool.exe -validate <fiile name...>

on a number of files, and the output was

Validate: OK
or
Validate                        : 4 Warnings (all minor)

What does it validate, are there any options to get more detailed output, ...?
I could envision this as a great addition for me users, for in-depth validation of files.

Phil Harvey

Add -warning -a to see all the warnings.

It catches a lot of common problems, but isn't 100% complete, especially for formats other than JPG/TIFF.

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

Mac2

That's cool. I will add this as another step into my generic metadata diagnostics toolset.

Mac2

Just did a test with

-validate -warning -a -json <file>

and this gives me only:

"Validate": "4 Warnings (all minor)"

in the output. Without -json I get:


Warning                         : [minor] Undefined value for MakerNotes:ClearRetouchValue
Warning                         : [minor] Non-standard IFD0 tag 0xc6d2 PanasonicTitle
Warning                         : [minor] Non-standard IFD0 tag 0xc6d3 PanasonicTitle2
Warning                         : [minor] IPTC TimeCreated too short (6 bytes; should be 11)


and I also get this detailed info when I use -X for XML output.

Anything special I need to do to make this detail data show up in the JSON?


Phil Harvey

From the -json option documentation:

            The -a option is implied if the -g or -G
            options are used, otherwise it is ignored and tags with identical
            JSON names are suppressed. (-g4 may be used to ensure that all
            tags have unique JSON names.)


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

Mac2

Ah! I remember having read something about folding JSON tag names in the documentation. I just did not link this to the -validate output.
Thanks for explaining.

I will have to run ExifTool twice on the file, to keep the data extraction and the detailed validation output separate. No big deal, its a single-file analysis tool.