Want a palette that shows a list of folders to open, but will visually indicate if the folder has files in it

Basically, I'm trying to visually monitor a lists of folders and whether or not each has files in it, with the ability to click to open the folder.

I thought a KM palette might do the trick, but I can't get all the way there.

I made a palette with actions that each open one of the folders I'm interested in. I am pretty sure I can work something up with script commands and Hazel to show the palette when any of the folders has something in it.

But I can't figure out if there's any way for an action in the palette to hide or appear differently/disabled when that particular folder is empty.

Can this be done?

Hi, @tamaracks; welcome to the Keyboard Maestro forum.

Since you are a new forum user, I'm going to refer you to three references that will make your time here much more efficient:


Are you looking for something that continuously indicates the state of these folders or would you like to display a palette on demand that indicates the states?

The only real way to do this would be with either the Custom HTML Prompt action or the Prompt With List action.

In either case, you would have to check the folders or contents and make a list of folders to display.

You can make a Macro that "marks" and "unmarks" another Macro's icon in a Palette with a checkmark.

Basically, in another Group, you would have a Macro that watches one of your folders and runs a check every time a file is added or removed from that folder.

You would need a "watching" Macro for each one of your folders so, it could be a bit of a task to set up. But it is possible.

Here is a video showing the idea with just one folder.

Check if Folder has Files in it-Animated GIFF 640 12fps

Here is the Macro which opens the folder and this Macro is shown on a Palette. When this Palette item is clicked the folder will open in Finder.

Click to Show Image of Macro

Folder 1.kmmacros (1.7 KB)

And here is the Macro to check the folder (in a different Group so it doesn't show itself on the Palette). I came up with a way to check if the folder is empty or not using Keyboard Maestro native actions but there might be a better way to do the check.

Click to Show Image of Macro

Folder 1 Check.kmmacros (4.6 KB)

Oh and one other thing. In order to initially mark or unmark the watched folders you would need to run the "watching" Macro once (using the play button) from the Keyboard Maestro editor (to initially mark or unmark the icon in the Palette). Hope that makes sense!

2 Likes