How to change a folder's tag color

I have a macro that creates a folder, gives it a time stamp and opens it (see attached). But I can't figure out how to include a command to give the folder a particular tag color. How would you do this?
Make "From" folder for clients attachments.kmmacros (4.5 KB)

This is how I do it:

Test

Tiffle - thanks for the quick reply, but this does not work. I wonder if it is because it says to set the tag for a file? Is there a way to set it for a folder?

The variable contains the name of a folder, so it does work but you need to specify the full pathname of the folder - maybe that’s why it’s not working for you. You can use it for files too but again you need the full pathname.

1 Like

So I am going to have to specify the pathname of the folder every time I run this macro? That doesn't really automate the process. Is there a way to have KM do it automatically?

I want to be able to run the macro and have it create the folder, rename it AND add a tag color - I don't want to have to tell it the pathname every time I run the macro...

As I’m away from my computer I haven’t been able to look at your macro. Presumably to create the folder your macro specifies it’s name? Do you keep that name in a variable? If so, then just put that variable into the action I showed you. Why do you think you have to keep specifying the name?

Tiffle - Perhaps when you get a chance you can take a look at the macro.

In the meantime, does anyone else have any suggestions on how to do this? It seems like there should be a very simple way to change a tag color, without having to resort to variables...

An update - I made an Automator workflow to change the folder tag color and inserted this into the macro - this works.
...But it still seems to me that KM should have an easy way to change tag colors - if anyone knows of one, I'd be interested in knowing about it.

Tiffle gave you the solution, which I've added to your macro:

ake "From" folder for clients attachments Macro (v9.0.5)

Make "From" folder for clients attachments.kmmacros (5.0 KB)

Note that I've also changed the first action to create a new folder rather than a new Finder window. Works here as expected.

mrpasini - thanks for the revised macro (you made a slight difference in how the newly created folder is selected/tagged, which makes all the difference). This works great - many thanks. And also thanks, Tiffle, for your efforts

Happy to help.

Glad it’s been sorted :+1: