Re: scripting secure empty trash
Re: scripting secure empty trash
- Subject: Re: scripting secure empty trash
- From: Andrew Brosnan <email@hidden>
- Date: Thu, 13 Jul 2006 16:25:53 -0400
Thanks,
I've implemented the previous suggestions and it's working great.
Regards,
Andrew
On 7/13/06 at 4:19 PM, email@hidden (Steven D. Majewski) wrote:
> I know I'm not supposed to answer an applescript question with a
> shell answer,
> but since Kai says it not directly scriptable, 'rm -P' might be a
> subsitute.
>
> From 'man rm' :
>
> > -P Overwrite regular files before deleting them.
> > Files are
> > overwritten three times, first with the byte
> > pattern 0xff,
> > then 0x00, and then 0xff again, before they are
> > deleted.
>
>
> so something like:
>
> do shell script "rm -R -f -P " & Posix path of (path to trash) &
"*"
>
> might do the trick --
> although something inside me flintches at the act of appending
> a wildcard onto the end of an 'rm' anything script. I would probably
> want to check that 'Posix path of (path to trash)' wasn't somehow
> and empty string. Maybe "rm -RfP ~/.Trash/* " would be safer +
> better.
>
>
> -- Steve Majewski
--
Andrew Brosnan ........ email@hidden
Broscom LLC .... Managed Services Provider
<http://www.broscom.com> .. 1 207 925-1156
Programming, Consulting, Websites, Hosting
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden