Renaming a file in the same directory using Folder Trigger keeps the macro in a loop


After spending 3 hours looking for a solution, I'm asking for your help... I'm trying to create a macro that:

  1. watch a folder for new items
  2. change the filename of the new file uploaded to this folder by the current clipboard contents.

It happens the macro keep running and renaming files every time the clipboard change its contents...

Any ideias? (using KBM 8.0.5)38

The macro is probably re-triggering each time you rename the file, even if you rename it to the same thing.

Try eliminating the rename in the case where the fileName and newfileName are the same

  • If variable fileName is not %Variable%newfileName%
    • Rename file.

Check the Engine.log file to ensure the macro triggers twice and then no more.

Hi, Elder.

Thanks for your reply!

Even though your idea of testing if both of variables don’t have the same content, IMHO we have a conceptual problem here of what means “adds new item” to a folder, since (in my point of view) a renamed file is not a new item … Note that I’m using the option “ignore partial or changing files” …

BTW, Keyboard Maestro is a wonderful software I’m planning to buy a license soon.


In renaming the file, the system probably removes it, changes the name and puts it back, hence it counts (as far as the system is concerned) as a new file.