Folder actions - a question about processing

Okay, this really isn’t a scripting question per se but it IS a question that will determine how I design my script flow.

I currently have a folder that I have attached five scripts to - one that updates a database record when the job files are copied to it, one that e-mails the client notifying the job is done, one that cleans up all of the work related files, etc.). SOME of these scripts need to run before others do but I don’t know how the folder actions decide what has precedence over another. Do they run in the order they are attached? Do they all run at the same time once the files finish copying?

I guess I could always write a single script to attach to the folder that loads the scripts in the order I need them to run, or I can alter my current script to reorder my scripts before I attach them to the folder (if they run in order). Just spitballing.

Hi,

regardless how many actions do you have attached to a folder,
only the first one will be triggered and the others will be ignored.

:expressionless: Huh. I never would have guessed that. Seems just cruel to let you attach multiple scripts if only one will run, who was the sadist that thought that up?

Thanks again Stefan - it looks like it’s time to rethink my script design.