Jump to content

Ignore in Alfred — Exclude files and folders from Alfred’s search results


Recommended Posts

 

Re: Issue with alfred:ignore in iCloud Drive

 

When I tag files or folders located in my iCloud folder with alfred:ignore, the colon is (almost) instantly is transformed to a forward slash -- alfred/ignore

 

This transformation seems to be due to iCloud Drive's syncing mechanism, as it doesn't occur with files/folders marked with the ".nosync" extension (excluding them from iCloud synchronization). The altered tag (alfred/ignore) then doesn't serve the intended purpose of excluding files from Alfred searches. It does however add "alfred/ignore" to my system tags.

Has anyone else experienced this or found a workaround?

Link to comment
13 hours ago, LyleDiamondScripts said:

When I tag files or folders located in my iCloud folder with alfred:ignore, the colon is (almost) instantly is transformed to a forward slash -- alfred/ignore.

 

I’m unable to reproduce this, regardless if the file is local or not. It is also the first time I’ve seen such a report. What macOS version are you on? Are you able to capture a video of the behaviour? You can record your screen with built-in macOS tools.

Link to comment
  • 3 months later...

Thank You for this.

I use Alfred for nearly every search, and typing "Zoom" in there brings up every Zoom-created sub folder for every meeting.

I couldn't figure out how to get Ignore in Alfred to not return Zoom and it's subfolders, but the comments here mentioning the tag alfred:ignore helped me.  I simply went to finder and tagged ~/Documents/Zoom - which didn't cover the subfolders, so I selected all of them and tagged them en mass too.

I might have to do that again occasionally, but at least now I can find other folders and files that relate to Zoom and I actually am searching for.

 

So again - THANK YOU!

Warm Regards,

David

Link to comment
  • 3 months later...
On 10/11/2023 at 5:24 AM, LyleDiamondScripts said:

When I tag files or folders located in my iCloud folder with alfred:ignore, the colon is (almost) instantly is transformed to a forward slash -- alfred/ignore

Same for me but only on my another Mac when the folder is synced there. Also this didn't happen to me. 

 

On 10/11/2023 at 5:24 AM, LyleDiamondScripts said:

It does however add "alfred/ignore" to my system tags.

Then, when I perform the ignore File Action on the same folder on the other Mac, both alfred/ignore and alfred:ignore tag coexisted for a moment and soon after that only alfred/ignore remained. When both Macs finished syncing, only alfred/ignore remained.

Link to comment
  • 3 weeks later...

Search instead for kMDItemUserTags == alfred:ignore. The workflow tags rather than comment. This allows for greater flexibility because you can have multiple tags but only one comment. Though the main reason the workflow does it this way is that kMDItemFinderComment has been unreliable for years. To the point that if I had to use kMDItemFinderComment and kMDItemUserTags weren’t an option, this workflow wouldn’t exist because I’d have thrown away the code.

Link to comment
  • 3 weeks later...

Hello. I'm trying to use this workflow, but when I installed and ran it with the command "Ignore" and then type the name of the folder, Alfred isn't showing the folder in the results I can access. It's pulling up a number of files within the folder, but I can't get to the parent folder to hide everything.

 

The folder is within my user folder.

 

Also, even when I manually tested tagging a single file with "alfred:ignore" it still is showing up in Alfred search results.

 

Here is the requested information as per @vitor

  • The Workflow: 2024.1
  • Alfred: 5.5
  • macOS: 13.6.3 (22G436)

In addition to:

 

Thank you!

Link to comment

I have found that, when a folder gets ignored with this workflow, content within the folder and sub-folders isn't. Actually, I wanted to do that.

 

I read someone talk about excluding stuff from Spotlight, and I totally forgot about that. This excludes all nested folders as well.  Am I getting it right? This workflow is to exclude specific files — something Spotlight allows you to do. So why did the need for this workflow arise?

Link to comment

The workflows does ignore the contents. Or, more accurately, it tags the contents accordingly. If that tagging is indexed by Spotlight in time is up to macOS. But if you add more contents later, you have to tag them too. Which is why there’s a reignore keyword.

 

Yes, you can do it with Spotlight. This is just another way to do it.

Link to comment
On 6/19/2024 at 3:51 PM, vitor said:

Try the Universal Action, detailed at the top of the instructions. That’s the the main method of access that you can do from anywhere

@vitor I used Universal Actions and found the folder, then selected "Ignore in Alfred" from the Universal Actions list. But when I then checked the folder, it is not tagged, nor are any of the subfolders.

 

How can I proceed from here? Thank you!

 

Also, I did add the folder to Spotlight's "ignore" settings, but it's still showing up in Alfred even days later after having done that in Spotlight. Spotlight is now ignoring it, but not Alfred still...

Edited by AuspiringMind
Link to comment

@AuspiringMind Try typing reload into Alfred immediately after ignoring. Also, the ignore is for that one specific file/folder. It does not apply recursively to all items in a folder. This is somewhat counterintuitive, but it's just how it works. I think if you want to exclude an entire folder you can add it to the system's Spotlight Exclusions. I believe that still works.

 

image.thumb.png.190c7bf1511b8ea65cd4f0734e811ace.png

Edited by luckman212
Link to comment
7 minutes ago, luckman212 said:

the ignore is for that one specific file/folder. It does apply recursively to all items in a folder.

@luckman212 Sorry I'm confused. This is exactly what I'm trying to do...to have it apply to all the items in the folder. You are saying it does do that. Or did you mean it does not apply to items in the folder?

 

However, after running the ignore command via Universal Actions, I go to the folder in Finder and the parent folder does not have the tag added. Neither does anything within it. So it doesn't seem to be taking any action at all...

 

7 minutes ago, luckman212 said:

I think if you want to exclude an entire folder you can add it to the system's Spotlight Exclusions. I believe that still works.

I did add it into the spotlight exclusion a week ago. Spotlight is ignoring it, but Alfred still is not.

 

Any further advice would be so appreciated. Thank you!

Edited by AuspiringMind
Link to comment
5 minutes ago, luckman212 said:

Sorry I meant to write "it does NOT"... 😐

 

Thank you @luckman212 So is there any way to have Alfred ignore the entire contents of a folder? Again I'm unsure why excluding it via Spotlight is working for Spotlight to not pull up any of its contents, but that's not being reflected in Alfred...

Link to comment

I will defer to Vitor or Andrew on that. I thought that if it wasn't included in Spotlight's index, then it would not be shown in Alfred either. Guess I am incorrect on that. Or, it's possible your Spotlight index is corrupt and needs to be rebuilt. Alfred has a tool built in to help do this, if you want to try: 

 

Click on Advanced, then...

 

screenshot_miw2Fksk.thumb.png.4c4312bd19fcde1f38e35dc525e2a690.png

Link to comment
14 hours ago, AuspiringMind said:

I used Universal Actions and found the folder, then selected "Ignore in Alfred" from the Universal Actions list. But when I then checked the folder, it is not tagged, nor are any of the subfolders.


I’ll need the debugger output of that.

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