Re: emptyTrash command
Re: emptyTrash command
- Subject: Re: emptyTrash command
- From: Rob Jorgensen <email@hidden>
- Date: Wed, 7 Feb 2001 23:25:53 -0500
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
Ohio, USA