Problem:
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: :100:](https://forum.keyboardmaestro.com/images/emoji/apple/100.png?v=9)
hello
2
here's one macro that watches a folder and based on the assigned tag moves it:
2 Likes
Hi Hello, Thanks for the quick reply! ![:man_astronaut: :man_astronaut:](https://forum.keyboardmaestro.com/images/emoji/apple/man_astronaut.png?v=9)
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)
![](https://forum.keyboardmaestro.com/uploads/default/original/3X/2/f/2f39206745c92e8b7963a8269d3dbc3577553fe5.png)
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)
-Chris
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: :thinking:](https://forum.keyboardmaestro.com/images/emoji/apple/thinking.png?v=9)
How can I add that action?
Thank you for the kind words. ![:sunglasses: :sunglasses:](https://forum.keyboardmaestro.com/images/emoji/apple/sunglasses.png?v=12)
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)
![](https://forum.keyboardmaestro.com/uploads/default/original/3X/d/7/d7278fce98faf8a13b277813ef5954f2b8c714f8.png)
If I have time I'll come back to this and demonstrate how to move the file with AppleScript.
-Chris
1 Like