Re: Deleting Folder Contents
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