Open Tag Folders

Hi, I've not had any issues actually tagging files and folders using KM, BUT I'm looking for a way to open Tags in a finder window, in the same way you could open a folder using KM.

I can't seem to find any way to tell KM that a 'tag' is a 'folder' (I know they aren't the same thing, they are more of a smart folder type thing).

Hey @scribblenik,

Welcome to the forum!   :smile:

This makes not sense (to me at least), please be more specific.

  • Do you mean you want to open a specific tagged folder?

  • Do you mean you want to display a list of tagged items in the front Finder window?



As an example, I'd like to jump straight to this tag and show its contents.

Screen Shot 2021-09-16 at 2.17.41 PM

You mean you want to open a Finder window and list all items tagged with β€œCurrent”?

Yep - the best I can think of, is using a 'smart folder' set with Tags=Current and then opening that folder via KM. I was trying to find a way to open the tag directly.

There is no tag to open. You can only access them via a smart-search in the Finder – or some other app that is tag-savvy.

You can access Spotlight from the Terminal, so you can search for tagged items with Keyboard Maestro and then display names or paths using a Execute a Shell Script action and mdfind.

The code would be something like this:

mdfind -onlyin / 'kMDItemUserTags == "Current"cd'

You could also have Keyboard Maestro type:

  • ⌘βŒ₯Space – To open a global Spotlight search window in the Finder.
  • Then Tag:Current – in the already selected search field.

There's also a tricky way to create a saved search and then cause it to open with AppleScript, but I haven't tested it in years and don't have time to mess with it at present. Take a look at this:

Open a Smart Folder in Finder - #4 by ccstone


Thanks - I ended up using a smart-search folder (see screenshot of KM). I've then added that to a pallet so I can now just hit my shortcut and press the key I want to open the folder I want.

Screen Shot 2021-09-16 at 2.52.24 PM

1 Like

Hey Chris,

Is display tagged items variation possible?

I have a palette (see pic) I use in Mail that simply opens a folder. I use it to quickly display a folder I want to drag an email into. That's non-coding, easy, and works. The drag comes in that I frequently want to update the list, and it's a bunch of actions to add a new location.

IF, as a variation to opening a smart folder, I could display the items 'in' smart folder (I know smart folders aren't locations, they're just saved searches) AND the smart folder was set to search a tag, then I could edit the list being displayed in Mail by editing Finder Tags.

The shorter route would be to have a persistent window that displays a selected Finder Tag, and palettes don't dynamically update as they are just lists of macros.

So now that I've thought out loud about this, I'm left with the question of whether there are any dynamically updating window options in Keyboard Maestro that can be used for this.

Wake me gently if I'm dreaming :sleeping: