Empty trash w/ locked items

There are a couple of ways to go about this:

  1. Hack the Finder to add a keyboard command for emptying the Trash (I use “T”). After doing so, Command-T empties the Trash. Using the OSAXEN “Sandi’s Additions,” you can then write a script that simulates Command-Option-T (TypeText “t” with Command and Option) which empties the Trash of all items including locked items.
    I believe that the Akua Sweets OSAXEN allows you to do the same without hacking the Finder but I personally find the Akua Sweets dictionary to be a little difficult.
  2. The other way is to unlock all items before you toss them into the Trash or unlock all items that reside in the Trash (set locked of every item of the entire contents of trash to false). I found that unlocking all items in the Trash created sporadic and unreliable results, especially with items locked in sub-sub-folders, etc. What does work consistently is to put the items in a temporary folder, unlock all the items, move them to the Trash, and then delete the Trash.
    Both methods work great. I’ll be more than happy to send you the scripts that I use/wrote.

: As far as I know, there is no easy way to tell the trash
: to override the locked status of an item when emptying
: the trash.
: You might try unlocking all the items in the trash prior
: to emptying.
: grh
Yep, just did a small test -
tell application “Finder”
set the locked of every file of folder “Trash” to false
empty trash end tell
– this works. hth -Toby

I can’t hack the finder…this is the server machine of a highschool…I doubt they’d go for that. I have a script that will unlock all the files, that should work. But I did just remember that Speed Doubler has an option to automatically delete locked files. Where’d that Speed Doubler disk go…