folder actions execute when relocating folder

Hi all,

Quick question about folder actions. I have one set up that works just fine. It uses the “on adding folder items to this_folder after receiving these_items” handler to process files, which remain in the folder after processing.

The only problem is that if I move the entire folder to a new location, it will process every single file again. It’s confusing because I’m not adding any items to the folder, I’m just relocating the folder.

Does anyone know how to prevent this? I know, the easy answer is to not move the folder. But this script will be set up as a folder action on many computers in my school district, and I don’t want it to come with any disclaimers like “don’t ever move this folder.”


Maybe you can create an alias file to the folder. Don’t allow the user to move the folder, but user can move the alias file.


It works, but it seems like more of a hack than a fix. But thanks for the idea!

How about a little script that toggles folder actions on/off? You could then move the folder and run the script again.


Vic, your solution would work from my end if I was preparing to move the folder myself. My problem, and I didn’t articulate this very clearly, is that this is a setup that will be used on many people’s computers throughout my school district. Once it is distributed, it will be out of my hands. So I want it to work as expected for anyone who uses this system, and they won’t know to disable folder actions before moving the folder.

The alias setup works well if you put the actual folder in a place that they don’t access normally. Then they can move the alias all they want, and the items within don’t get processed again.

Thanks for the help, and I’ll post a follow-up if I do hear of a way, within the script, to tell the difference between when items are being added and when the folder is relocating.


I was pondering this subject recently, Dave - and came up with an idea that I believe may largely address the issue.

Since the suggestion may be of general interest, I’ve posted it at Code Exchange. I hope it gets a bit closer to what you are (or at least were) looking for… :slight_smile: