Searching for a name in Image Description or Keywords

Started by linuxuser, February 06, 2012, 08:03:17 AM

Previous topic - Next topic

linuxuser

I want to search a directory for photos with a person, eg Angela. who could be mentioned in [EXIF] 0x010e Image Description or [IPTC] 0x0019 Keywords

How can that be done?

Phil Harvey

Just the same as your previous question.  The -if argument is a Perl-like expression with tag names as the variables:

exiftool -if '$imagedescription=~/Name/i or $keywords=~/Name/i' ...

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

linuxuser

Thanks, I thought it must be something like this, but how can I choose a group like EXIF or IPTC, in case there are more fields with the same name?

Phil Harvey

-if '$exif:imagedescription=~/Name/i or $iptc:keywords=~/Name/i'

This is why I call it "Perl-like".  The variable names conform to the ExifTool tag name convention instead of the Perl variable naming convention.

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