ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: linuxuser on February 06, 2012, 08:03:17 AM

Title: Searching for a name in Image Description or Keywords
Post by: linuxuser on February 06, 2012, 08:03:17 AM
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?
Title: Re: Searching for a name in Image Description or Keywords
Post by: Phil Harvey on February 06, 2012, 08:20:00 AM
Just the same as your previous question (https://exiftool.org/forum/index.php/topic,3896.0.html).  The -if argument is a Perl-like expression with tag names as the variables:

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

- Phil
Title: Re: Searching for a name in Image Description or Keywords
Post by: linuxuser on February 06, 2012, 10:02:18 AM
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?
Title: Re: Searching for a name in Image Description or Keywords
Post by: Phil Harvey on February 06, 2012, 10:14:53 AM
-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