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