Re: emptyTrash command
Re: emptyTrash command
- Subject: Re: emptyTrash command
- From: Rob Jorgensen <email@hidden>
- Date: Wed, 7 Feb 2001 20:11:45 -0500
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
-- <Insert normal "Don't blame me..." disclaimer here> :p
FYI, I don't think you can lock folders, although they may remain in
the Trash if they contain locked files.
Later,
Rob Jorgensen
Ohio, USA