ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: BogdanH on October 20, 2010, 03:22:29 PM

Title: How to find files containing Keyw1 AND Keyw2?
Post by: BogdanH on October 20, 2010, 03:22:29 PM
Hi,

I have done some perl research in this regard. So far, I've found, that
exiftool -filename -if "$xmp:subject=~/\b(Keyw1|Keyw2)/i" *.jpg
-will list all files containing (starting with) either Keyw1 OR Keyw2 (OR both).

How do I list all files, where both keywords (starting with), Keyw1 AND Keyw2 exist?

Thanks for answering,
Bogdan
Title: Re: How to find files containing Keyw1 AND Keyw2?
Post by: Phil Harvey on October 20, 2010, 07:13:44 PM
Hi Bogdan,

A simple way to do this is:

-if "$xmp:subject=~/\bKeyw1/i and $xmp:subject=~/\bKeyw2/i"

- Phil