• 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: Really delete a file via AppleScript
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Really delete a file via AppleScript


  • Subject: Re: Really delete a file via AppleScript
  • From: Craig Sutherland <email@hidden>
  • Date: Sun, 3 Aug 2003 13:38:23 -0500

OS X has implemented 'rm' to delete without asking. In other environments the shell asks for confirmation before deleting. If you are suing the Terminal in 10.2.6, you can add the line

alias rm 'rm -i'

to your ~.tcshrc file. If you don't have that file created, create it with that one line. The -i parameter adds confirmation to the process with the line 'remove filename?'. The alias as you already surmised subtitutes 'rm -i' when rm is entered.

I have not done this out of impatience and stubbornness, resulting in deleting my /usr directory once in the last 6 months and the whole she-bang in the last year. Sigh.

HTH
Craig
On Sunday, August 3, 2003, at 11:00 AM, Michelle Steiner wrote:

do shell script "rm " and POSIX path of theFile

Do you mean this: do shell script "rm " & POSIX path of theFile

I find myself making that error all too often. I have to train myself to call "&" "ampersand" rather than "and".
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Really delete a file via AppleScript
      • From: Doug McNutt <email@hidden>
References: 
 >Re: Really delete a file via AppleScript (From: Michelle Steiner <email@hidden>)

  • Prev by Date: Re: Really delete a file via AppleScript
  • Next by Date: Re: Script to Get Finder Selection?
  • Previous by thread: Re: Really delete a file via AppleScript
  • Next by thread: Re: Really delete a file via AppleScript
  • Index(es):
    • Date
    • Thread