• 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: Deleting Folder Contents
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Deleting Folder Contents


  • Subject: Re: Deleting Folder Contents
  • From: "Mark J. Reed" <email@hidden>
  • Date: Mon, 11 Oct 2010 14:58:30 -0400

On Mon, Oct 11, 2010 at 2:24 PM, Luther Fuller <email@hidden> wrote:
> And you can also use the shell of course:
> do shell script "rm -dfr /Users/SomeUser/Downloads/junkystuff/"

Get rid of the -d option; it doesn't do anything unless you're running
rm as root, makes no sense combined with -r, and even if you are
running as root and not using -r, it's dangerous, as it unlinks
directories without first removing their contents.

You want the -r if you want to delete everything under the folder,
including any subfolders recursively.  You might or might not want -f
- it stands for force, and besides saying "if there's any way you can
delete this, do so", it also says "don't bother telling me if you
can't delete it for some reason."  So it's bad for error detection; if
you care whether or not the stuff is actually deleted, you might be
better off without it.

--
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

  • Follow-Ups:
    • Re: Deleting Folder Contents
      • From: Luther Fuller <email@hidden>
References: 
 >Deleting Folder Contents (From: Luther Fuller <email@hidden>)
 >Re: Deleting Folder Contents (From: Luther Fuller <email@hidden>)

  • Prev by Date: Re: Deleting Folder Contents
  • Next by Date: Re: Deleting Folder Contents
  • Previous by thread: Re: Deleting Folder Contents
  • Next by thread: Re: Deleting Folder Contents
  • Index(es):
    • Date
    • Thread