Jump to content

Advanced file search with filetypes


Recommended Posts

I'm an excited Alfred user, but sometimes I do not get the results I'm actually looking for. 

Lets say, I want to find all Pages documents which include "lorem ipsum". I can start a search with "in lorem ipsum" but then I get all kind of filetypes. 

It is simple done with spotlight with "lorem ipsum kind:pages", so I can't imagine I'm not able to perform a similar search with Alfred. Any suggestions?

Link to comment

https://www.alfredapp.com/help/workflows/inputs/file-filter/ lets you set up a dedicated filter for a particular file type.  

 

Thanks for your reply, I checked it and reproduced it on my own machine but by using such filters I am not able to look for the contents of a file.

Apart from that, this would mean I have to create an individual workflow for every filetype I am possibly will be looking for? Alfred seems to be such a powerful tool, there has to be an easier way (hopefully) …

Link to comment

Thanks for your reply, I checked it and reproduced it on my own machine but by using such filters I am not able to look for the contents of a file.

Apart from that, this would mean I have to create an individual workflow for every filetype I am possibly will be looking for? Alfred seems to be such a powerful tool, there has to be an easier way (hopefully) …

 

 

Hi there,

 

There are a few other ways to deal with this, but first could you please enter your registered Powerpack email address in your forum profile? As this is a Powerpack-specific feature, we just need to confirm you're a Powerpack user :)

 

Thanks,

Vero
Link to comment

You need to add one of the metadata keys -- I think it's kmdItemContent -- in order for file filters to search contents.

I just use Spotlight if I need to search within a file -- I used to have Alfred set to search all file contents (not the default) but turned it off a couple of years ago b/c I realized I wasn't using Alfred primarily to search documents, but to launch apps and workflows etc. But I have also accumulated documents in so many different formats over the years that in practice I rarely want to restrict file type.

I think for most users Alfred is not a Spotlight replacement but a complement, adding a ton of capabilities on top of the same index that Spotlight uses.

Link to comment

Hi dfay, applying your tip with kMDItemTextContent I am finally able to find the relevant files  :). Thanks for the help. Nevertheless, it still means to have one workflow per filetype. 

 

@Vero I added my Powerpack email address in my forum profile since I'm happy to hear about other possibilities dealing with this.

Edited by es560
Link to comment

Hi dfay, applying your tip with kMDItemTextContent I am finally able to find the relevant files  :). Thanks for the help. Nevertheless, it still means to have one workflow per filetype. 

 

@Vero I added my Powerpack email address in my forum profile since I'm happy to hear about other possibilities dealing with this.

 

 

Hi Erik,

 

Thanks for confirming your Powerpack user status :)

 

Here's a nice place to start: In the Workflows preferences, click the [+] and add > Examples > Dynamic File Search. 

 

In this case, the first thing you set is a scope, but you could instead use it to populate the file type field (e.g. by choosing a file to set the type or by adding a List Filter object). Have a play around with this workflow example and let us know how you get on :)

 

Cheers,

Vero
Link to comment

 

Hi Erik,

 

Thanks for confirming your Powerpack user status :)

 

Here's a nice place to start: In the Workflows preferences, click the [+] and add > Examples > Dynamic File Search. 

 

In this case, the first thing you set is a scope, but you could instead use it to populate the file type field (e.g. by choosing a file to set the type or by adding a List Filter object). Have a play around with this workflow example and let us know how you get on :)

 

Cheers,

Vero

 

 

 

Ok, could be a way, but sorry, this is not really comfortable. You should be able to set the filetype afterwards, not at the beginning. Let's say, you are looking for something and after you started typing you see plenty of different filetypes which contain your term, so instead of limit the results to a specific filetype you have start a new search beginning with a workflow  :)

I'm really astonished, I can't do some basic stuff like this with Alfred  :mellow:

Link to comment

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...