Re: Apple Script to run a shell script
Re: Apple Script to run a shell script
- Subject: Re: Apple Script to run a shell script
- From: "Mark J. Reed" <email@hidden>
- Date: Mon, 24 May 2010 17:51:43 -0400
Backslashes are interpreted by AppleScript before they get to the shell, and so have to be doubled inside "do shell script" strings. So you need to have "DROP\\ FOLDER", which turns into "DROP\ FOLDER" for the shell, which turns into just "DROP FOLDER" by the time the mkdir command sees it. Alternatively you can use quotation marks around the filename instead of backslashes within it. Double quotes need to be backslashed for AppleScript ("\"DROP FOLDER\""), single quotes (as Joel suggested) don't ("'DROP FOLDER'").
I assume this was simplified from a more complex script? If you're just running a literal shell script with nothing being passed in from AppleScript, I don't see the point of doing it from AppleScript instead of just directly from the shell.
On Mon, May 24, 2010 at 5:42 PM, Curt Schultz
<email@hidden> wrote:
Hello List,
I am trying to create an Apple Script that will in turn run a shell script. I am not a scripting person at all and don't use AppleScript very much. This is what I have:
Unfortunately it wont compile. When I try to compile it, I get a message: "Expected “"” but found unknown token."
The space between the "\" and the word "FOLDER" is then highlighted. When I run the line from the terminal without the path, everything works fine
(This works in the terminal)
Am I missing something? any assistance is appreciated.
Thanks
Curt
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden
--
Mark J. Reed <
email@hidden>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden