|
|
Use launchd to replace folder actions
The biggest problem I've found with using launch daemons is that you can't pass the name of the added item. Using folder actions, you can get the name and the path of each item added. For example:
Using launch daemons, there is no argument passed to your script providing the name or the path of the item. It makes it difficult to manipulate this new file without knowing it's name or path. Am I wrong?
Use launchd to replace folder actions
It simply depends on your needs. In my case, I know that there will be one to many tiff-files which need to be ocr'ed. It's very simple to get a list of files with AppleScript:
Use launchd to replace folder actions
Well, I suppose (have not tried) that launchd when calling whatever.sh would be passing it each item one-by-one (i.e. calling it several times if multiple items were added). In case of /bin/sh they will be known to shell script as $1, and then will be passed over to AppleScript. So, you should have all the same (or similar) info and control, no?
|
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysNo new commentsLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.09 seconds |
|