re: unmount disk [empty trash & varients]
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.