How To Tag a File Dragged To A Folder

NEWBIE Alert: Did a few searches and could not find the answer. I want to tag an image when I drag it to a certain folder. I found the "Trigger this folder" option and have the right folder selected. But in my "Set tags to "name"" it is asking for a specific file which I'll never know. I just want it to assign a tag to ANY item I drag to that folder. What is the best way to do this? Thank you very much.

Howdy, welcome to the forum! As you might have already figured out, this is a great community full of people who love to help.

Take a look at the macro I placed below. Basically it monitors the folder (I used Desktop for simplicity, you will need to change this to the folder of your choosing in both the trigger and the directory in the action), and whenever a new file is added it tags it with "Test". You will probably want to change the name of that as well.

It does this by looking through each Local_file in that directory, setting that file to the aforementioned variable, and then uses that variable as the file path to tag.

Let me know if you have any questions!

-Chris

Tag file when dragged to folder.kmmacros (2.4 KB)

1 Like

Nice. what is the initial action you are selecting? I want to reproduce this on my own. Thanks

The one in the screenshot: For Each Path in Folder.

Got it working thanks. Will pay it forward when I understand more!

Great news!

Careful there, you might find yourself endlessly in debt. :laughing:

As much as I have learned with Keyboard Maestro over the last few years, I am constantly in need of help with the more complicated aspects (especially AppleScript and Shell Scripts), so the more I learn, the more questions I ask, and the more I feel compelled to help others haha!

3 Likes