• 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: empty trash with locked files
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: empty trash with locked files


  • Subject: Re: empty trash with locked files
  • From: Rob Jorgensen <email@hidden>
  • Date: Mon, 17 Sep 2001 19:14:38 -0400

On 09/17/2001, Mike Egglestone commented:

Hi,

I was wondering if there is a way to write a script that
would empty the trash even though locked files are in it.

<snip>

Or is there a way to unlock all files in the trash first,
but be able to unlock files in more than one folder?

I don't recall where it came from, but this appears to work:

-- Begin Code --

tell application "Finder" to set countTrash to (count of items of trash)
if countTrash is 0 then
return
else
tell application "Finder"
set locked of every file of entire contents of trash whose locked is true to false
empty
end tell
end if

-- End Code --


Later,

Rob Jorgensen
Ohio, USA


References: 
 >empty trash with locked files (From: Mike Egglestone <email@hidden>)

  • Prev by Date: status display
  • Next by Date: Re: Image file info?
  • Previous by thread: empty trash with locked files
  • Next by thread: Re: empty trash with locked files
  • Index(es):
    • Date
    • Thread