Jump to content

A workflow that search a given folder for files with a particular content?

Recommended Posts

Take a look at this Alfred help page about file search—in particular about the ability to use the in keyword to search inside the content of files.


You can limit the scope of a file search as you wish: take a look at the help page on the File Filter Input.


If you have problems setting up the workflow just post again and someone will help.



Link to comment

That helped. Got it working but I think I need to scroll and see a preview of everything found. I was kind of looking to get the equivalent of a finder search where I can then scroll through the preview. Maybe I'm trying to do something that alfred is not really meant for?

Link to comment

You could add to the workflow an Automation Task set to Read File Contents (assuming we're talking about text files) linked to a Copy to Clipboard action and then browse using Alfred's clipboard viewer. I appreciate that's not exactly what you want but it may help to point the way to some workable solution for you.


Edit: You could instead of the clipboard action add an Action in Alfred action, set Jump to… to Open with… and connect that to the Quicklook app.

Edit 2: Ignore the last idea: it appears not to work: sorry.



Edited by Stephen_C
Additional idea
Link to comment
8 hours ago, vitor said:

Try adding a kMDItemTextContent (Click the [+]) in the Fields tab.



I already had it. The problem is that with file filter workflows, using two search words does not seem to work. I don't need to add in because it's already implied, I think.

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