Jump to content

Exclude folders and filetypes both globally and for file filters


Recommended Posts

  • 2 months later...
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 post
Share on other sites

@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 post
Share on other sites
  • 3 years later...

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 post
Share on other sites
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 post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...