• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Unlocking items in trash
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Unlocking items in trash (From: Amir Bozorgzadeh <email@hidden>)

  • Prev by Date: Re: file or folder?
  • Next by Date: Re: reading large text file
  • Previous by thread: Re: Unlocking items in trash
  • Next by thread: Attachment with entourage
  • Index(es):
    • Date
    • Thread