Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I've created a Folder Action in Automator and applied it to a folder. But it only gets triggered when a file is added to the root of that folder, not to one of its subfolders.

Is there any way to get Folder Actions be trigger when changes occur in subfolders?

(And, no, I do not want to apply the Action to each subfolder; they are always changing, so I need it to be dynamic.)

share|improve this question
add comment

2 Answers

up vote 1 down vote accepted

Without writing a full-blown Objective-C app, this is pretty difficult to do well.

I wrote something you might be able to use a while back. Just put it up on Github here. It's a Ruby script that you should be able to use as long as you're comfortable in a shell and text editor. No Ruby knowledge required.

It's a bit dumb, in the sense that it just runs a shell command when a change is detected in the watched folder (or subfolders). You can use that to call an Applescript though. Should be some way to do the same for Automator workflows.

However, if you depend on the input from the folder action (i.e. the files/folders that triggered the action), this won't work.

You could probably modify the Ruby script to catch the path of the files/folders triggering the event, and then pass that to an Applescript or Automator action, but I didn't need anything that complex, so I just hacked this together.

Good luck.

share|improve this answer
add comment

You should take a look at an amazing app called Hazel, from Noodlesoft which will trigger even AppleScripts to folders.

share|improve this answer
    
Hazel is really the solution for almost anything you'd think "Folder actions would be perfect for this, but...." –  Alan Shutko Oct 22 '12 at 17:55
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.