Jump to content
Tyler Eich

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:

Share this post


Link to post

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

Share this post


Link to post

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?

Share this post


Link to post

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

Share this post


Link to post

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

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...