• 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 items
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Empty trash with locked items


  • Subject: Re: Empty trash with locked items
  • From: Robert Rust <email@hidden>
  • Date: Thu, 19 Jul 2001 19:00:55 -0500

> Sorry for the basic question, but I'm having trouble navigating
> www.apple.com/applescript. . .
>
> How can I empty the trash when there exists locked items?
>
> tell application "Finder"
> empty trash (with command key down?)
> end tell
>

I found this doesn't work well when there are a large number of files in the
Trash. In my case it was under MacOS 9.0.4 (and due to other AS issues I
can't upgrade), so I hacked the Finder to add a keyboard shortcut to the
'Empty Trash' command. I then used a scripting addition (Sandi's
Additions?) to script typing the keystroke with the option key modifier.
Since I have to wait until the trash is empty, my script checks the trash
every 3 seconds to see if it's empty until it is, then continues.

Robert


  • Follow-Ups:
    • Re: Empty trash with locked items
      • From: John W Baxter <email@hidden>
  • Prev by Date: Extracting info from Quark 4 stylesheets
  • Next by Date: Re: Select CD
  • Previous by thread: Re: Empty trash with locked items
  • Next by thread: Re: Empty trash with locked items
  • Index(es):
    • Date
    • Thread