Re: Empty trash with locked items
Re: Empty trash with locked items
- Subject: Re: Empty trash with locked items
- From: John W Baxter <email@hidden>
- Date: Thu, 19 Jul 2001 22:50:58 -0700
At 19:00 -0500 7/19/2001, Robert Rust wrote:
>
I found this doesn't work well when there are a large number of files in the
>
Trash. In my case it was under MacOS 9.0.4 (and due to other AS issues I
>
can't upgrade), so I hacked the Finder to add a keyboard shortcut to the
>
'Empty Trash' command. I then used a scripting addition (Sandi's
>
Additions?) to script typing the keystroke with the option key modifier.
>
Since I have to wait until the trash is empty, my script checks the trash
>
every 3 seconds to see if it's empty until it is, then continues.
I fear that this method has the potential to do one of
a) delete a file which is not only marked busy but is actually
importantly in use.
Such as a file moved to the trash by an installer for cleanup on a
subsequent restart. I see the potential for crashes here; or
b) be unable to delete a file marked busy, and so never see the trash
empty. The result would more likely be an endless loop than an Apple event
timeout, since I doubt there is a single Apple event outstanding during the
waiting period. Either way, there is not success. [Hmmm...there should be
an event generated by Sandi's Additions and aimed at the Finder...that
might time out.]
I've forgotten which happens with Option key plus Empty Trash executed by hand.
--John
--
John Baxter email@hidden Port Ludlow, WA, USA