Jump to content

Add option for file filters to exclude specific file types


inkytonik
 Share

Recommended Posts

At the moment when I perform a file search I get a lot of results that I'm not interested in seeing. Primarily these are by-products of compilation of programs. E.g., Java class files.

 

My understanding is that the current version of Alfred v2 provides a few ways in which specific file types can be excluded:

 

* Under "Features | File Search" there is the "Don't Show" section. The problem here is that the categories not to show are hard-wired and don't cover all of the cases that are a problem for me. Also, it's not immediately obvious what types are covered by categories such as "Source Files".

 

* Spotlight can be told not to index particular directories. This is fine if the files you want to exclude occur in obvious directory hierarchies and are not accompanied there by files you *do* want to index. That is not the case for me. E.g., Java class files occur all over the place in my HOME directory and are co-located in project directories with files such as source code or documentation which I do want to index.

 

* A custom workflow to replace the default file search. In a file filter it is possible to specify which file types should be included. Unfortunately, the types I want to include are more numerous than the ones that I want to exclude. I am currently forced to specify all of the "include" file types which is tedious and error-prone since I may never know that I've left something useful out. It would be much easier to specify "exclude" types since I can always add to that list later without running the risk of missing things.

 

Am I missing another method that would do what I want?

 

If not, I would like to suggest that an explicit configuration option be added to file filters to allow specific file types to be excluded by the filter.

 

thanks,

Tony

 

Link to comment
Share on other sites

Yeah, I agree. A "black list" for File Filters, rather than just a "white list". Would be very handy.

 

Just thinking on my feet here, but I'm assuming that Alfred uses a spotlight query to get the subset of files to search. If so, why not have an "advanced" option where we can enter a Spotlight query directly, with all the ANDs and NOTs and ORs we like? But maybe that's not how it works. :unsure:

Link to comment
Share on other sites

Yeah, I agree. A "black list" for File Filters, rather than just a "white list". Would be very handy.

 

Just thinking on my feet here, but I'm assuming that Alfred uses a spotlight query to get the subset of files to search. If so, why not have an "advanced" option where we can enter a Spotlight query directly, with all the ANDs and NOTs and ORs we like? But maybe that's not how it works. :unsure:

 

Yep you are right, that isn't how it works :P

 

Alfred creates extremely refined queries directly to the low level metadata server, bypassing Spotlight altogether - This is how he manages to achieve very high performance. To give users the option to use ANDs, ORs etc, Alfred would have to have his own syntax interpreting and translate that into a correctly formed query. This is something which I have thought about for quite some time, but is very low priority compared to some other stuff in the works.

 

Having said that, Alfred does internally have a way of blacklisting certain types per filter, I'll expose that to the File Filter workflow object preferences if I get time (possibly not for v2.0)

Link to comment
Share on other sites

The 'Advanced' tab of a File Filter object lets you ignore specific kinds of files. For example, to ignore .zip files, you would set a field with the options:

  • Metadata: 'kDMItemKind'
  • NOT: true
  • Value: 'Zip Archive' (because that's what Finder calls .zip files, found under a .zip file's "Kind" description)

This may or may not be what David and/or Andrew mentioned earlier

 

Alfred 2.0 (112) on OS X 10.8.2

Link to comment
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
 Share

×
×
  • Create New...