patgilmour Posted April 19, 2017 Share Posted April 19, 2017 On 3/14/2017 at 0:10 PM, Andrew said: 2. A regex to subsequently filter by path, allowing path matches to be rejected. That would be great (if it could include OR | type options). Link to comment Share on other sites More sharing options...
robertstrazz Posted June 20, 2017 Share Posted June 20, 2017 I would like to place another vote for this. Ability to exclude certain folders is my #1 request. A nice to have would be to make "open x" only return folders as results and not individual files. Thanks! Link to comment Share on other sites More sharing options...
deanishe Posted June 20, 2017 Author Share Posted June 20, 2017 1 hour ago, robertstrazz said: A nice to have would be to make "open x" only return folders as results and not individual files. This is trivial to do with a File Filter. You can also assign a much shorter keyword than open. Mine is f. Link to comment Share on other sites More sharing options...
Vero Posted June 21, 2017 Share Posted June 21, 2017 @robertstrazz Following on from @deanishe's suggestion to use a file filter, here's a guide to creating your own file filter workflows: https://www.alfredapp.com/help/workflows/inputs/file-filter/ You'll also find a pre-created file filter workflow built into Alfred in the Workflows preferences, press the + at the bottom of the sidebar > Examples > Simple Folder Search. Cheers, Vero Link to comment Share on other sites More sharing options...
slowkow Posted January 21, 2021 Share Posted January 21, 2021 I'm trying to understand the discussion so far, but I think I'm lost. I can't seem to find regular expression matching or simple string matching e.g. "~some file.pptx".startswith("~") in the Alfred settings. Is it true that Alfred does not and will not allow users to exclude items from the result by using string matching or regular expressions? For example, I never want to see the Microsoft Powerpoint backup files that always start with the "~" character. However, I do want to see the actual ".pptx" files. I would like to tell Alfred that I don't want to see results that match this regex: ^~ Link to comment Share on other sites More sharing options...
deanishe Posted January 21, 2021 Author Share Posted January 21, 2021 18 minutes ago, slowkow said: Is it true that Alfred does not and will not allow users to exclude items from the result by using string matching or regular expressions? Correct. The macOS search API is fundamentally include-only. You can exclude directories from being indexed in the first place (via Spotlight's "Privacy" pane), but there is no way to specify any sort of exclusion in a search. This question was asked again more recently, and here's Andrew's explanation for why post-filtering results in Alfred isn't feasible: Link to comment Share on other sites More sharing options...
Hans Tammen Posted March 26, 2022 Share Posted March 26, 2022 (edited) Would it be possible to use alfred:ignore to include items within a folder? Hans Edited March 26, 2022 by Hans Tammen Link to comment Share on other sites More sharing options...
gills Posted August 7 Share Posted August 7 I'm still a little confused after reading through this thread and others. I understand it isn't possible in normal results, but the suggestion to use File Filters keep popping up. So is it possible to exclude folders that match a string specifically in a custom File Filter workflow? Link to comment Share on other sites More sharing options...
FireFingers21 Posted August 7 Share Posted August 7 @gills Yes it is. In the File Filter under the Fields tab, add a search field using the + button and click `kMDItemDisplayName`. Change the value from `{query}` to the string you want to match and click the checkbox under the NOT column. Now any folder name containing the string you specified will be excluded from the results of that File Filter. See the documentation for the File Filter Input here, which might explain the Fields section a little better. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now