• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Simply deleting a fil
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Simply deleting a fil
      • From: "Mark J. Reed" <email@hidden>
    • Re: Simply deleting a fil
      • From: Doug McNutt <email@hidden>
References: 
 >Re: Photomerge (From: Stan Cleveland <email@hidden>)
 >Simply deleting a fil (From: Satyam Satyanarayana <email@hidden>)
 >Re: Simply deleting a fil (From: Yvan KOENIG <email@hidden>)
 >Re: Simply deleting a fil (From: Tim Mansour <email@hidden>)
 >Re: Simply deleting a fil (From: "Sutapalli Satyanarayana" <email@hidden>)
 >Re: Simply deleting a fil (From: Tim Mansour <email@hidden>)
 >Re: Simply deleting a fil (From: Emmanuel Levy <email@hidden>)

  • Prev by Date: Re: Simply deleting a fil
  • Next by Date: Re: Simply deleting a fil
  • Previous by thread: Re: Simply deleting a fil
  • Next by thread: Re: Simply deleting a fil
  • Index(es):
    • Date
    • Thread