Example: Find filters, defined in buttons (Opus 13)

Complex filters can now be defined directly within commands/buttons, without a fixed filter needing to be defined separately.


Making filters.

You can build filters using the UI you're used to, and then convert them into text at the end. Just click the "Edit as text" checkbox at the top right to toggle modes. You don't need to learn or write filter definitions by hand (unless you prefer to).


Command syntax

Filters can be passed to the Find command in a few different ways. These are all equivalent, and which you use comes down to readability and your own preference.

The new [[ ... ]] syntax allows splitting a long command across multiple lines, and potentially using multiple lines for a single complex argument. It doesn't have to be used, but makes complex filters easier to work with.

For this example, I want to make a list of everything below my ...\Steam\userdata folder which is also directly under a screenshots folder. The results should go into a collection named Steam Screenshots.

One way to write it:

Find IN "C:\Program Files (x86)\Steam\userdata" COLLNAME "Steam Screenshots"
[[
FILTERDEF location match "*\\screenshots"
]]

It could also be written like this:

Find IN "C:\Program Files (x86)\Steam\userdata" COLLNAME "Steam Screenshots" FILTERDEF location match "*\\screenshots"

Or like this:

Find IN "C:\Program Files (x86)\Steam\userdata" COLLNAME "Steam Screenshots"
[[ FILTERDEF location match "*\\screenshots" ]]

Same thing, but excludes the "thumbnails" folders themselves:

Find IN "C:\Program Files (x86)\Steam\userdata" COLLNAME "Steam Screenshots"
[[
FILTERDEF location match "*\\screenshots" and name nomatch thumbnails nowild
]]
1 Like