Moving Files and Folder Based on 2 or 3 Tags


I want to make a macro that cleans some of my messy folders that have everything inside.

How can I create a macro that moves my files and folders based on the tags they have.

An example, a file has two tags of Logo and Sample should move to /Users/myNameIsBen/Documents/Design/Logo/Samples

Maybe I need to define 50 Tag conditions in one macro.

Also, please let me know even if this is doable or even is a good idea.

Thanks :100:

here's one macro that watches a folder and based on the assigned tag moves it:


Hi Hello, Thanks for the quick reply! :man_astronaut:
How can I add 2 or 3 tags for my TriggerValue?

Hey BB,

You can't combine found conditions. You have to find for each tag name โ€“ something like this:

Detect Finder Tags in a Given File 1.0.kmmacros (11 KB)

If I was doing this and had many sets of tag-conditionals I'd personally much prefer to do the job in AppleScript.

Detect Finder Tags in Selected File with AppleScript 1.0.kmmacros (8.4 KB)


1 Like

Thank Chris!

OMG. Your macros are so clean and organized!

I tried to add a moving file action but it didn't work. Perhaps I'm doing something wrong. :thinking:

How can I add that action?

Thank you for the kind words. :sunglasses:

Most likely.

Ordinarily since I'm using AppleScript anyway I'd move the file with it as well, but this macro shows how to do it with Keyboard Maestro.

You can find the tag names in the AppleScript by looking for:

--ยป TAGS

The AppleScript is passing the selected file to Keyboard Maestro as well as a boolean for whether it has the tags named in the script.

Move Selected File IF Certain Finder Tags Are Found (AppleScript) 1.0.kmmacros (12 KB)

If I have time I'll come back to this and demonstrate how to move the file with AppleScript.


1 Like

Thanks, Chris :dizzy: