Re: Simply deleting a fil
Re: Simply deleting a fil
- Subject: Re: Simply deleting a fil
- From: Roger Howard <email@hidden>
- Date: Fri, 17 Apr 2009 11:10:09 -0700
On Fri, 17 Apr 2009 13:07:55 +0200, Emmanuel Levy <email@hidden>
wrote:
> At 8:48 PM +1000 4/17/09, Tim Mansour wrote:
>>Or you could use
>>the shell "rm" command as suggested by Skeeve.
>
> If you use "rm" use exactly the following syntax (assuming "f" is an
> AppleScript alias or a file reference):
>
> do shell script "rm " & quoted form of posix path of f
>
> Others have forgotten the "quoted form" part and have emptied in a
> few seconds their Home directory.
I would say that in all cases, when passing a POSIX path to a shell
command, it's wise to use "quoted form of" - even for simple paths you may
not expect would need it, it's just smart to have an automatic escaping
mechanism to handle those unexpected gotchas.
Are there any cases where "quoted form of", when using a POSIX path *as* a
path in a shell command, is unnecessary?
_______________________________________________
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