Re: Unlocking items in trash
Re: Unlocking items in trash
- Subject: Re: Unlocking items in trash
- From: Benoit Blaquiere <email@hidden>
- Date: Tue, 21 Aug 2001 09:25:08 +0200
>
I need a script to unlock items in trash so it can be emptied with a simple
>
empty trash command. Is this possible or can this be done at all? Thanks.
>
-
>
__________________________________________________
>
Amir Bozorgzadeh
>
ITS - DSG
>
5 Lindquist Center
>
319-335-5480
>
email@hidden
>
_______________________________________________
>
applescript-users mailing list
>
email@hidden
>
http://www.lists.apple.com/mailman/listinfo/applescript-users
>
Try this, it's a part of an AppleScript I've written a long time ago :
set fileList to files of trash as list
set folderList to folders of trash as list
my UnlockFiles(fileList, folderList)
on UnlockFiles(fileList, folderList)
tell application "Finder"
repeat with fileItem in every item of fileList
set locked of fileItem to false
end repeat
repeat with folderItem in every item of folderList
my UnlockFiles(files of folderItem, folders of folderItem)
end repeat
end tell
end UnlockFiles
--
Benoit BLAQUIERE e-mail: email@hidden
Institut Geographique National / IGN Espace
Parc Technologique du Canal - 24, rue Hermes
31527 Ramonville-Saint-Agne cedex - France
Tel: +33 (0)5 62 19 19 45 Fax: +33 (0)5 61 75 03 17