How to find files containing Keyw1 AND Keyw2?

Started by BogdanH, October 20, 2010, 03:22:29 PM

Previous topic - Next topic

BogdanH

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

Phil Harvey

Hi Bogdan,

A simple way to do this is:

-if "$xmp:subject=~/\bKeyw1/i and $xmp:subject=~/\bKeyw2/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 ($).