Ignore Specific Subfolders / Folders in Search/Find

Can I set specific SUBFOLDERS to be ignored in search/find?

e.g. I have some folders called"node_modules" which has a lot of spam. I have a few designated folders such as "software_backups" that shouldn't be searched. And I have some automated backups at dropbox/apps

Is there some sort of .dcf file I can dump in those folders to be ignored in directoryOpus searches? E.g. for things like dropbox/apps

Or perhaps a global search arguments to ignore folders matching a specific criteria? E.g. any contents within folders named node_modules

There isn't a global way to prevent a folder being examined by Find or Search.

When using Windows Search (as you are in Default search in folder with toolbar search? - #5 by AnacondaPython), it looks like you can add -folder(C:\Path\To\Folder) to the search query string to exclude certain folders (found here).

To exclude a specific folder’s contents, along with subfolders and their contents, the path to that folder can be specified with a minus sign as in this example syntax:

-folder:(C:\Users\Administrator\Desktop\chart graphing)

If you know that the folder has a unique name within the full area that you are searching, then you can leave off most of the path, as in:

-folder:(chart graphing)

If you instead want to permit searching inside of subfolders of such a folder, while still excluding files that are immediately inside of that folder, then use:

-foldername:(chart graphing)

You can use multiple instances of the syntax to exclude more than one folder.

When using Find (Advanced) with a filter, you can filter by location or sub-folder, but then everything has to be defined by the filter (at least currently; we plan to make that more flexible one day), which is less useful if you want to automate things while still feeding in key parameters (e.g. the wildcard) via a simple prompt.

Leo, I think I would use the first option. I wouldn't search for my code repositories via directory opus anyhow, these would be through my development environment / IDE.

I tried doing the following

-folder:(C:\Users\Vincent\Dropbox\Apps\chart graphing) didn't work for me. I got search results in the dropbox/app folder

The full button's function field value looks like so:

Find IN "C:\Users\Vincent\Dropbox" COLLNAME "Found Documents" QUERY {dlgstring|Enter document search query} -folder:(C:\Users\Vincent\Dropbox\Apps\ graphing)

That space before the last path component doesn't look right.