Search code examples
tagsmetadataexiftool

Find exif tags in image by name/value


Is it possible to find and print all exif tags, contained specific word in name/value. For example I need to find all tags, who has "Unknown" value or all "Nikon*" name tags? Will be nice to do it with exiftool.


Solution

  • You can't list just tags that have a specific value but you can check to see if there exists a tag with the value by checking full groups of tags. For example:
    exiftool -if "$EXIF:all=~/Unknown/" -EXIF:all /path/to/files/
    With that command, if one of the tags in the EXIF group contains a value that includes "Unknown", then all the EXIF tags will be displayed. You can check against the group All:All but processing will be very slow as it will check against all tags that exiftool knows, not just what is in the file, which numbers in the 10s of thousands.

    You can use wildcards when listing tag names. For example, you could use -GPS* and all tags that start with GPS will be listed.