• 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: unmount disk [empty trash & varients]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

re: unmount disk [empty trash & varients]


  • Subject: re: unmount disk [empty trash & varients]
  • From: email@hidden
  • Date: Thu, 8 Aug 2002 14:20:18 EDT

Scott,

if your trash can (under OS 7.x - 9.x) is set not to warn
(select trash can icon, type command-i for get info,
uncheck the warn before emptying button), then the
following will work without user interaction, except in
cases where a file is locked or busy. If you have warnings
turned on, it will prompt the user:

tell application "Finder"
empty trash
end tell

To empty the trash without warning even with the warning preferences on, use:

-- note: still generates message if any locked files encountered
tell application "Finder"
empty trash without warns before emptying
end tell

If you want to trash locked files as well, use this:

tell application "Finder"
set locked of trash's entire contents to false
empty trash without warns before emptying
end tell

Best Wishes,
=-= Marc Glasgow

Scott McKay Wrote:

>
>For that matter, I can't for the life of me recall how to
>empty Trash with AppleScript without the usual annoying
>dialog boxes.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: 'Save As' JPEG in Acrobat
  • Next by Date: Re: Checking the OS Version?
  • Previous by thread: Re: 'Save As' JPEG in Acrobat
  • Next by thread: osascript, root vs other users
  • Index(es):
    • Date
    • Thread