Re: A question on shell scripting in AppleScript
Re: A question on shell scripting in AppleScript
- Subject: Re: A question on shell scripting in AppleScript
- From: Rob Stott <email@hidden>
- Date: Tue, 8 Feb 2005 15:30:56 +0000
On 8 Feb 2005, at 15:21, Francois Houle wrote:
<deletia> when the command is in an AppleScript, as bellow then I get that there is an unknown identifier, wether I use "quote" signs or |vertical| signs
eg: do shell script "rm /Users/myaccount/Documents/My\ Folder"
How can I go around this ?
Hi Francois,
I'd do it like this...
set theFileToDelete to choose file with prompt "Choose a file to delete!"
do shell script "rm " & quoted form of (POSIX path of theFileToDelete)
...the "quoted form" bit deals with all those pesky spaces etc automatically. I think the rest is pretty self explanatory, but shout if it isn't!
r.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden