Re: empty trash command
Re: empty trash command
- Subject: Re: empty trash command
- From: JJ <email@hidden>
- Date: Thu, 08 Feb 2001 15:48:39 +0100
On 2/7/01, I commented on "Re: emptyTrash command":
>
On 2/7/01, Braulio Gonzales commented on "emptyTrash command":
>
>
>Using apple script is there a way to use the command, emptyTrash,
>
>to permenatly delete locked folders or files, the following scripts
>
>don't seem to work;
>
>
>
>tell application "Finder" to empty the trash
>
>tell application "Finder" to empty trash
>
>
You could try this:
>
>
-- Warning: this WILL delete everything in the Trash, without warning.
>
>
tell application "Finder"
>
set lockedFiles to every item of trash whose locked is true
>
repeat with i from 1 to (count of lockedFiles)
>
set locked of item i of lockedFiles to false
>
end repeat
>
empty
>
end tell
>
On further reflection and some testing, this may be a better way to
go, unless you have extremely large numbers of files to deal with:
tell application "Finder"
set locked of every file of trash to false
set locked of every file of every folder of trash to false
empty
end tell
If someone has already addressed this, I apologize for repeating it.
My ISP (RoadRunner) is experiencing severe email disruptions, and I
don't think I'm getting all of my mail. The worst part is that they
are saying it will take 7-10 days to fix the problem. What a load of
crap!
Later,
Rob Jorgensen
Hi,
what about Jon's Commands?:
tell application "Finder" to deleteFile (every item in the trash as list) ,
with unlocking without safety net -- every locked item, every empty
folder
That's all!
(What an expressive today!)