Jump to content

Search Trash using File Filters


Recommended Posts

I have a private workflow called 'Filters' with a bunch of different file filters, each scoped to one of my favorite folders. One filter that I would really like to add is a Trash filter; I just can't figure out how to tell Alfred to search my Trash :(

 

I tried setting the Scope to ~/.Trash, and then I tried turning 'Show files marked as System File' on. Neither option provides any results.

 

Am I missing something?  :huh:

Link to comment

I have a private workflow called 'Filters' with a bunch of different file filters, each scoped to one of my favorite folders. One filter that I would really like to add is a Trash filter; I just can't figure out how to tell Alfred to search my Trash :(

 

I tried setting the Scope to ~/.Trash, and then I tried turning 'Show files marked as System File' on. Neither option provides any results.

 

Am I missing something?  :huh:

 

At first guess, I would suspect that Spotlight won't provide search results from ~/.Trash and so therefore, Alfred won't either. Tinkering around at a terminal for a second, I can't get mdfind to list results in ~/.Trash either

Link to comment

At first guess, I would suspect that Spotlight won't provide search results from ~/.Trash and so therefore, Alfred won't either. Tinkering around at a terminal for a second, I can't get mdfind to list results in ~/.Trash either

 

I did some work in the Terminal just now; I ran the following commands:

$ mdimport ~/.Trash

I understand this command adds items to Spotlight's index. Then:

$ mdfind -onlyin ~/.Trash "query"

I understand this command give me results from Spotlight's index for the specified folder. This command gave me results after running mdimport. However, Alfred still gives fallback results.

 

I'm not too skilled with the command line, nor do I completely understand Alfred's file search underpinnings. Why does mdfind find items Alfred will not?

Link to comment
  • 2 months later...

I'm having a similar problem where I want to setup a filter for Plist files in ~/Library/Preferences in /Library/Preferences. I have enabled the system files option in the File Filter input and set my search scope to those two folders, to no avail. I also made sure that there were no exclusions in Spotlight preferences that would break this.

 

I also tried adding both folders using mdimport like Tyler suggested but this didn't change anything on my side either. One thing to note is that mdfind returns nothing after an mdimport in my case:

mdfind -onlyin ~/Library/Preferences "plist"

Any ideas?

Edited by Form
Link to comment

I'm having a similar problem where I want to setup a filter for Plist files in ~/Library/Preferences in /Library/Preferences. I have enabled the system files option in the File Filter input and set my search scope to those two folders, to no avail. I also made sure that there were no exclusions in Spotlight preferences that would break this.

 

I also tried adding both folders using mdimport like Tyler suggested but this didn't change anything on my side either. One thing to note is that mdfind returns nothing after an mdimport in my case:

mdfind -onlyin ~/Library/Preferences "plist"

Any ideas?

 

This should work using the File Filter item. Is there somewhere you could share the workflow so that I could take a look at it? If not, you could email it to me, david @ alfredapp

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