tags:

views:

43

answers:

2

I'm trying to to write an applescript that will run any shell script that is dropped on a particular folder on my network.

I've been trying with:

on adding folder items to target_folder after receiving this_script tell application "Terminal" to open this_script end adding folder items to

Any ideas?

A: 

Untested, but try:

on adding folder items to target_folder after receiving added_items do shell script " " end adding folder items to

See Technical Note TN2065: do shell script in AppleScript on how to format your shell script.

songdogtech
That didn't seem to work. The script runs fine when typed into the terminal. I think it might have to do something with the script not being executable. I get better results when I run a chmod +x on it first. I just have no idea how to write the syntax for doing that first and then running the script.
Patrick Casey
Edit your question above and add your shell script so people can see it.
songdogtech
A: 

I'll bet cash money it's because you have some characters that need escaping in your shell script. Post your script.

stib