Multiples Folder Actions in one folder - or one 'master' script?

Hello again,

For the paste couple of days, I’ve been trying to automate a workflow to convert and add video files to iTunes - adding subtitles in the process as well. I have a working workflow set up with folder actions - however, I’m not sure I’m doing the ‘right’ way.

Right now I have one single folder where I add the video files, subtitles are added to that same folder automatically and I have two folder actions assigned to that folder (frankly, I haven’t even understood how multiple folder actions work on a single folder - is one triggered before the other? which one?)

When adding a an .avi or .srt files, one of the scripts checks for a file with a same name but a different extension, and sends the video to processing if there exists (adding an .avi looks for an .srt and vice versa).

The other scripts looks for folders or zip files added to the folder - it then looks for .srt files inside the folder or zip file and moves it to the top-level folder (the same with the movie files).

This does seem to work - however, it looks fragile, because I’m not even sure with script is triggered first.

So: is this the best way to do it?

I thought of two alternatives:

  1. either having a unique script that does all of this (looks even more cumbersome, though);
  2. have a separate folder to where subtitles are downloaded, attached a folder action that processes the subtitles to that folder and, on completion, move the final .srt files to the same folder with the .avi files.

Any thoughts? :confused:

Thanks in advance!

Hello.

I think that moving a file to the next folder to perform the next step sounds like a good idea.