Page 1 of 1

Searching photos for keywords they *don't* have?

Posted: Sun Nov 30, 2014 4:53 pm
by gaikokujinkyofusho
I found pretty quickly how to search for photos using "contain" or "is any of" parameters but haven't been able to figure out if its possible to do a "negative" or "not" searches like for all the photos that don't contain a keyword, is this possible?

While I am at it, is there somewhere I can find more info on how to do regex searches in XNViewMP?

Either way, its still a great program and much appreciated!!

Re: Searching photos for keywords they *don't* have?

Posted: Sat Feb 14, 2015 3:59 am
by danjcla
This is pretty easy as long as you are somewhat comfortable with SQL; XnView doesn't currently have good negation support in some areas.

But if you are cool with querying the database directly, this should work:

Code: Select all

SELECT Pathname || Filename AS Fullpath, Label
FROM Tags
JOIN TagsTree on TagsTree.TagID = Tags.TagID
JOIN Images on Images.ImageID = TagsTree.ImageID
JOIN Folders on Folders.FolderID = Images.FolderID
WHERE Label IS NOT 'whats his name'
ORDER BY Fullpath
Where 'whats his name' is the tag you don't want the image to have. For more negation, add "AND IS NOT 'i also do not know her name'" etc etc

Look at my recent posts for various thoughts on how to integrate that into XnView workflow.