Launchd execute command when folder contents modified or changed.

Posted by ThomasReggi on Super User See other posts from Super User or by ThomasReggi
Published on 2011-06-25T23:02:55Z Indexed on 2011/06/26 0:24 UTC
Read the original article Hit count: 443

Filed under:
|
|

For the past two days i've been trying to get a launchd plist to execute a script "program" when the contents of a folder on my desktop contents have modified or changed. I've gone through tons of configuration settings and have tried the Users/me/Desktop/folderinquestion and Users/me/Desktop/folderinquestion (with and without trailing slash).

The script executes only when something is added or removed but it doesn't recognize when files are updated and subdirectories. launchd is really my last hope to getting this to working i've already exausted folder actions, and bash scripts, uninstallable linux methods etc.

I have used Lingon to create my plists and have followed this youtube tutorial. Any help would be greatly appreciated.

This is what I have right now, and like I said does not work when folder is modified or changed

enter image description here

IDEA:

Thinking about creating two separate plists that reference each other one plist can watch a folder for additions and subtractions and when one occurs it can create another plist that watches every file in the folder, this could also be recursive and count in for subdirectories.

© Super User or respective owner

Related posts about mac

Related posts about unix