Home » Mac, Reviews, how to

How to: Empty Downloads folder with AppleScript

21 April 2011 10,395 views No Comment

“Cleanliness is next to godliness” or so the saying goes. If that’s true, getting the work done automagically with a cleverly crafted AppleScript must be a sure ticket to Mount Olympus residency. Here’s a little script to flush your Downloads folder.

A few weeks back, I authored Tip: Keep your Downloads folder clean and mused out loud that an AppleScript for the task might exist. Well, the lads at OS X Hints just published one:

Adobe Education Storetry
tell application “Finder”
move (files of alias “Macintosh HD:Users:YOURUSERNAMEGOESHERE:Downloads” whose name is not “Clear Downloads.app”) to trash
end tell
on error — oops, couldn’t move the file
display dialog (“Error”) buttons {“OK”}
end try

I can verify that this AppleScript performs admirably — just the stuff for the compulsively clean.

Have handy tip or AppleScript? Share your story and a link in the comments below…

Get 50% off your first 3 months at audible.com!

Leave your response!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.