FoxTrot Search Forum
FoxTrot Search for macOS Forum

Home » Public Forums » FoxTrot Search User Forum » How to exclude folders from search results
How to exclude folders from search results [message #1406] Thu, 21 April 2022 12:53 Go to next message
Atlas
Messages: 130
Registered: August 2009
Senior Member
I can se how to include only folders, but how to exclude folders from search results? Thanks.
Re: How to exclude folders from search results [message #1407 is a reply to message #1406] Thu, 21 April 2022 13:05 Go to previous messageGo to next message
FoxTrot Engineering
Messages: 384
Registered: April 2020
Senior Member
First, you could consider creating an index that do not contain these folders, using the "skipping these subfolders" list, in the manage indices window.

But if you want to exclude one or multiple folders for a specific search only, then you can use an advanced filter; for example:
[then apply advanced filter] [parent folder name] [is not exactly the string] [] [my folder]
or:
[then apply advanced filter] [parent folder name] [is not any of the strings] [multiple strings] [folder 1—folder2] (use the option-dash character, not the minus sign)
or:
[then apply advanced filter] [full path] [does not start with the string] [] [/path/to/my folder/]


Jérôme - FoxTrot Engineering
Re: How to exclude folders from search results [message #1408 is a reply to message #1407] Fri, 22 April 2022 08:52 Go to previous messageGo to next message
Atlas
Messages: 130
Registered: August 2009
Senior Member
(1) Yes, I think your suggestion works if I want to exclude search ITEMS FROM specific folders. But I'm asking if we can exclude FOLDERS FROM the search results. For example, if a file contains "foo" in the content, "foo" in the file name, and it is under the folder named "foo", I still want to see that file; I just don't want to see the folder named "foo" showing up as well. Why would anyone want to do such a search? Because they have a lot of folders that give false positive results, when they're only interested in seeing folder contents.

(2) Is it fair to say that there's currently no way to exclude folders from search results in general? This is possible with just regular Spotlight search or Houdahspot, because you can "exclude by kind". In Foxtrot, I can only choose "include by kind".

(3) Foxtrot has been around for years, and I guess it hasn't bother anyone, so maybe it's a low priority ask. But can we have a feature to exclude by kind in the future (maybe version 8 )? Or if you don't want to do exclude by kind, then please give us ability to "include multiple kinds", so that we can have more control over which file type show up in results? The feature to include multiple kinds would essentially be the same as allowing to exclude by kind, if the list of kinds of finite and small enough.

[Updated on: Fri, 22 April 2022 08:53]

Report message to a moderator

Re: How to exclude folders from search results [message #1409 is a reply to message #1408] Fri, 22 April 2022 09:27 Go to previous messageGo to next message
FoxTrot Engineering
Messages: 384
Registered: April 2020
Senior Member
Sorry, I did not understand your question correctly.

The easiest way to find files, but not folders, is to search in [contents only], instead of [contents, any metadata or filename]. But if you want to also search in the filename and the parent folder name (or parent folder path, if you set the UseRelativePathForParentFolder hidden preference), this won't work for you.

To only show found files, but not found folders, in the "item kind" categorization pane, select all the kinds (PDF, word processor…) except folder (use shift-click or drag-select).


Jérôme - FoxTrot Engineering
Re: How to exclude folders from search results [message #1410 is a reply to message #1409] Fri, 22 April 2022 11:27 Go to previous message
Atlas
Messages: 130
Registered: August 2009
Senior Member
Thank you very much. Yes, filtering by "Item Kind" in the Categorization Pane is the proper way to do this, given the current settings. It just never occurred to me that I can select multiple kinds in that pane.
Previous Topic: Feature Request - Email Notifications
Next Topic: Is there a limit to how long regex expression can be?
Goto Forum:
  


Current Time: Fri Apr 19 06:05:22 GMT+2 2024