Move a File to a Folder and Replace Same-Named File

You're welcome, @toddlerner.

Fortunately, I think I figured it out. For some reason, the version of the macro you were using had a variable containing the full file path (Local__FileToMove) where it should have used the one that only contained the file's name (Local__FileName). I got the same "file already exists" error when I tried it with the version you were using, but fixing the variables being used seems to have done the trick. Now that your Trash File action is working properly, this should work for you:

Move to Links Desktop Folder - from gabe glick 1.1.kmmacros (5.2 KB)

By the way, if the reason you had the first action option-click rather than normal click was to have the file be copied rather than moved, I'm afraid that wouldn't work, since KM isn't moving or copying the file by dragging it the way we would manually. You used the word "move" in your OP and this thread's title, so I assumed you wanted to move rather than copy, but if you do just want to copy, the answer isn't to change the mouse click action, but the file one at the bottom:

One other change I made to this version is to add a notification at the end, so if that shows up, you'll know the macro ran successfully without needing to check the copied file(s).

1 Like