Exiftool lets me easily locate images with a person identified:
exiftool -if '$regionname eq "Thomas Hughes"' -filename -ext jpg -r .
How do I find files with two people (logical AND) in them? I tried this:
exiftool -if '$regionname eq "Thomas Hughes" and $regionname eq "Catherine Hughes"' -filename -ext jpg -r .
But that didn't return any results. I'm using Mac OS X 10.11 and exiftool 10.36.
Many thanks!
Your first command will find images that only have Thomas Hughes in them. It won't find images with Thomas Hughes and someone else. To do that, you would have to use
exiftool -if '$regionname=~/Thomas Hughes/i' -filename -ext jpg -r .
To find more than one person, try this
exiftool -if '$regionname=~/Thomas Hughes/i and $regionname=~/Catherine Hughes/i' -filename -ext jpg -r .
Wow, thank you. This does exactly what I want. Is there a reference you can point to that explains the syntax in the -if statements? I don't quite understand the role of the tildes and the slashes.
Quote from: Tomhughes on December 15, 2016, 07:41:41 PM
Wow, thank you. This does exactly what I want. Is there a reference you can point to that explains the syntax in the -if statements? I don't quite understand the role of the tildes and the slashes.
That is the normal perl regular expression syntax (http://perldoc.perl.org/perlre.html).
Here's another resource (http://www.tutorialspoint.com/perl/perl_regular_expression.htm) that might be a bit less technically and easier to learn from. I always find perldoc.perl.org pages to be harder to learn new things from.
Thank you -- that second resource is that much clearer!