I need to see which tags are missing from the file, but which are in my request

Started by Jom, July 30, 2022, 12:18:00 PM

Previous topic - Next topic

Jom

How do I get ExifTool to display the tag which value I'm requesting, but which is missing from the file?
In the list of tags, I need to check which ones are missing from the file.

wywh

I recently noticed that some images lacked ExifIFD:DateTimeOriginal. Before fixing, I searched them with:

exiftool -q -q -ext jpg -ext heic -ext png -ext tif -if 'not $ExifIFD:DateTimeOriginal' -p '$FileName' .
And some images lacked IPTC:TimeCreated which caused Photos.app to display the time as "0.00" although ExifIFD:DateTimeOriginal was correct. I searched them with...

exiftool -q -q -if '$IPTC:DateCreated and not $IPTC:TimeCreated' -p '$FileName' .
...and fixed with:

exiftool -m -P -overwrite_original_in_place -if '$IPTC:DateCreated and not $IPTC:TimeCreated' -IPTC:DateCreated= -IPTC:TimeCreated= .
- Matti

Jom

1. But I don't know in advance which tags are not in the file. I want to request a list of tags and get either a value or an empty value.
Checking each tag manually is not an option.

2. Why do you use IPTC tags and not the XMP equivalent? I use only EXIF and XMP.

greybeard

There may be a better way but I use the tabular -T option and it gives a dash if the tag doesn't exist

exiftool -Make -Model -tag1 -tag2 -T xxx.jpg

Jom

No, it doesn't fit, I should see the name of the tag that ExifTool didn't find in the file.
And it is required that the output is designed for easy viewing, i.e. a list, not a tab-string.


Jom

It looks like this is what I need.
Thanks.

Is it possible to force ExifTool to issue a message if an incorrect tag is entered? In my example, it does not react to the wrong tag in any way.

======== ./MVI_1745.MOV [1/1]
DateTimeOriginal                : 2022:07:27 17:52:58+03:00
KHJGJHJHFGJHGJHkjhgjhJHGJH      : -
Nickname                        : MVI_0000.MOV
    1 directories scanned
    1 image files read

Jom

But, probably, this is not necessary, because I will be able to see the wrong name at the recording stage.

PS D:\_temp> exiftool -exif:kjhgkjhg='sdfgsdf' .\MVI_1745.MOV
Warning: Tag 'exif:kjhgkjhg' is not defined
Nothing to do.
PS D:\_temp>

StarGeek

Quote from: Jom on July 30, 2022, 04:18:19 PMIs it possible to force ExifTool to issue a message if an incorrect tag is entered? In my example, it does not react to the wrong tag in any way.

You can't force a message, but you could change the - into a unique string with the -api MissingTagValue option.

C:\>exiftool -a -s -AllDates -make -model -FooBar -f -api MissingTagValue="MISSING TAG" y:\!temp\Test4.jpg
DateTimeOriginal                : 2022:07:29 09:47:46
CreateDate                      : 2022:07:29 09:47:46
ModifyDate                      : 2022:07:29 09:47:46
make                            : MISSING TAG
model                           : MISSING TAG
FooBar                          : MISSING 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

Jom

Yes, it can be done, but it also reacts only to the missing tag value, but not to its incorrect name.
If ExifTool could report unrecognized tag names when extracting metadata, it would be convenient to find errors in large lists of tags even before writing their values.

ModifyDate                      : 2022:07:29 09:47:46
blabla                          : UNRECOGNIZED

It's perfect, but this does not necessarily, I can get errors in tag names at the recording stage.

Phil Harvey

Quote from: Jom on July 30, 2022, 05:05:51 PMIf ExifTool could report unrecognized tag names when extracting metadata, it would be convenient to find errors in large lists of tags even before writing their values.

For XMP tags, I do it like this (in Mac/Linux):

exiftool -v FILE | grep adding
- 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 ($).