Finder – Macros to Set a Selected Folder Icon and to Create a New Folder with a Given Icon

Assistance requested by newbie.

I would like to create a macro to set the icon of a folder.

Peter has advised:

“It looks like you are setting the icon of the folder.

You can do that with the Set File Icon action (action:Set File Icon [Keyboard Maestro Wiki]).

You can operate on the Finder selection as described:

Working with the Finder Selection

Combining the two you should be able to make a macro that sets the selected folder icon to the pre-selected on (pasting that icon into the Set File Icon action).

If you need any help making the macro, the folks on the forum (https://forum.keyboardmaestro.com/) can help with this sort of thing.”

I have been fiddling with the links Peter emailed, but am clueless as how to proceed.

In the best of all possible worlds, I am trying to get two macros…

A) One that will change the icon of an existing folder.

B) One that will create a new folder and assign the default icon image to that newly created folder. Both would save a lots of steps, when one has to do it manually on Mac.

Any assistance will be appreciated.

Thank you in advance.

Hey @possomcohen,

Welcome to the forum!  :sunglasses:

When a topic on the Wiki leaves something to be desired be sure to search the forum for examples. You'll usually find a multitude, although they're not always easy to understand.

Here are a couple of example macros.

-Chris


Finder ⇢ Set Icon of Selected Items v1.00.kmmacros (25 KB)
Keyboard Maestro Export

Finder ⇢ Make New Folder with a Given Icon v1.00.kmmacros (27 KB)
Keyboard Maestro Export

2 Likes

Thank you very much.

Good Afternoon Chris,

Greetings from New Zealand. You are indeed "The Script Meister."

I know next to nothing about Keyboard Maestro, except for several basic macros I created by using the Record function.

It took several minutes of fiddling to figure out how to specify the default icon image I wanted, etc... and get the shortcut keys to work on my iMac.

Voila.

Both macros work perfectly on my Mac. That will save me so much time and many keystrokes.

Much appreciated.

2 Likes

Don't depend too much on the record function. It's very literal and will often give you a lot of junk along with any useful actions.

That said – it can be useful when you are learning and if you don't have unrealistic expectations.

You'll find that the more you use Keyboard Maestro the more you want to use it, because all those tasks that take seconds and minutes can often be reduced to milliseconds and seconds.

Tedium can be replaced with a keystroke...

Let the adventure begin!

:sunglasses:

-Chris

Hello Chris,

You seem to be a clued-up, worldly tech coding guru.

Have you ever seen an app that does the following:

Save to a text file both the url and the descriptive version of the URL, both clickable?

On Safari I use an app

Tabs To Links

in Chrome

COPY URLs to Clipboard

Both work well... but neither will do the dual formats simultaneously.

Twin - YouTube (underlined and clickable in a rich text file)

Thanks.

Marc

Hey Marc,

Have a look at this macro:

Set Clipboard to RTF Hyperlink & Plain Text MD Link

-Chris

Hello Chris.

I will have a look this weekend.

Thanks very much.

Marc