Empty trash without Preview blocking a file

Jan 16, '09 07:30:00AM

Contributed by: tice

After opening a file with Preview, the app blocks it (marks it as in use) until you quit Preview. To easily empty the trash without manually switching back to Preview and closing everything, I found finally this (simple) solution. Open Script Editor and create this AppleScript:

tell application "Preview"
quit
end tell

tell application "Finder"
empty trash
end tell
This simple AppleScript does the work, and with the free application Spark, it's only a keypress away from activation.

Comments (13)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20070307120951914