The lowdown on the downloads -- how to stay organized?
September 20, 2007 10:06 AM   RSS feed for this thread Subscribe

How to best organize and maintain my Downloads folder in OS X? Automator tips?

My Downloads folder currently has 96 items in it... I know I should just take the time to manually sort and delete/save it all, but I'm curious how other people manage to organize their downloads.

Are there any useful Automator tricks? It would be handy for files older than a week or so to automatically be moved elsewhere, but as far as I can tell, OS X only recognizes a file's created-on date, not its saved-to-this-folder date.
posted by Robot Johnny to computers & internet (9 comments total) 6 users marked this as a favorite
It would be handy for files older than a week or so to automatically be moved elsewhere,

I think Hazel will do this for you.
posted by Armitage Shanks at 10:15 AM on September 20, 2007


I have an Applescript attached as a Folder Action script for my downloads folder:


on adding folder items to this_folder after receiving these_items
tell application "Finder"
repeat with this_item in these_items
try
set this_type to the kind of this_item as string
tell me
if (this_type is "Folder") then
processFolder(this_item)
else
processFile(this_item)
end if
end tell
on error err
display dialog (err as string)
end try
end repeat
end tell
end adding folder items to

on processFolder(this_folder)
tell application "Finder"
set these_items to every item in this_folder
if the (count of these_items) is 1 then
repeat with this_item in these_items
try
set this_type to the kind of this_item as string
tell me
if (this_type is "Folder") then
processFolder(this_item)
else
processFile(this_item)
end if
end tell
on error err
display dialog (err as string)
end try
end repeat
end if
end tell
end processFolder

on processFile(this_file)
set new_folder to (path to home folder as string) & "Inbox:"
tell application "Finder"
if (the name of this_file ends with "dmg" or the kind of this_file is "Installer package" or the kind of this_file is "Application") then
set new_file to new_folder & "Apps:" & the name of this_file
if not (exists new_file) then
move this_file to new_folder & "Apps:"
else
delete this_file
end if
else if (the name of this_file ends with "doc" or the name of this_file ends with "xls" or the name of this_file ends with "ppt" or the name of this_file ends with "pdf") then
set new_file to new_folder & "Docs:" & the name of this_file
if not (exists new_file) then
move this_file to new_folder & "Docs:"
else
delete this_file
end if
else if (the name of this_file ends with "mp3" or the name of this_file ends with "aac" or the name of this_file ends with "m4a" or the name of this_file ends with "m3u") then
set new_file to new_folder & "Music:" & the name of this_file
if not (exists new_file) then
move this_file to new_folder & "Music:"
else
delete this_file
end if
else if (the name of this_file ends with "avi" or the name of this_file ends with "mov" or the name of this_file ends with "mp4" or the name of this_file ends with "mpg" or the name of this_file ends with "mpeg") then
set new_file to new_folder & "Movies:" & the name of this_file
if not (exists new_file) then
move this_file to new_folder & "Movies:"
else
delete this_file
end if
else if (the name of this_file ends with "jpg" or the name of this_file ends with "jpeg" or the name of this_file ends with "gif" or the name of this_file ends with "png" or the name of this_file ends with "bmp") then
set new_file to new_folder & "Images:" & the name of this_file
if not (exists new_file) then
move this_file to new_folder & "Images:"
else
delete this_file
end if
else if the name of this_file ends with "html" then
set new_file to new_folder & "Web Pages:" & the name of this_file
if not (exists new_file) then
move this_file to new_folder & "Web Pages:"
else
delete this_file
end if
end if
end tell
end processFile


You'll need to adjust your folder structure accordingly, but that's the gist of it.
posted by mkultra at 10:17 AM on September 20, 2007 [1 favorite]


Ugh, sorry about those extra line breaks.
posted by mkultra at 10:17 AM on September 20, 2007


I have an AppleScript similar to mkultra's except without all the else if statements; it just makes new folders for filetypes it hasn't seen before.
posted by jjg at 11:03 AM on September 20, 2007


Seconding Hazel. It's a shareware preference pane add-in that let's you create rules to automatically keep your downloads folder (or any folder really) organized by criteria you set (e.g., date downloaded, file type, etc.) It really works pretty well.

I just wish there was something as simple and elegant for Windows that I could use at work...
posted by dyslexictraveler at 12:25 PM on September 20, 2007


I advise having separate folders for the types of things you download and just downloading directly into there. For example, it is simplicity itself to use a different folder for Soulseek (only music) than for BitTorrent (almost always video). If you download from Usenet, use a client that can download to different folders based on the group you're in (Thoth does this, I'm sure others do too).

I do have a general downloads folder I use for things I download with a Web browser and other "general" apps, but if I download something that I want elsewhere, I move it immediately after I download it, or else just download it there in the first place by doing "Save As" or "Download To" in the browser's context menu. Otherwise, I don't bother to organize or clean this folder at all. I just keep it sorted by date so the most recent stuff is on top. It currently has 755 items in it. Once every year or so I'll view it by name and delete old versions of app disk images, but that's about it.
posted by kindall at 12:36 PM on September 20, 2007


Thanks, everyone. Hazel looks perfect.
posted by Robot Johnny at 1:44 PM on September 20, 2007


I use the Perl script in the comment entitled "10.4: Use PERL to keep the desktop clean" on this page, which may contain solutions of interest to you as well.
posted by WCityMike at 3:51 PM on September 23, 2007


Don't know if anyone's still looking in here, but MacUpdate Promo has a nice special on Hazel today.
posted by kindall at 9:18 AM on September 27, 2007


« Older Tips for helping a 6th grader,...   |   New England road trip! Your in... Newer »

You are not logged in, either login or create an account to post comments



Related Questions
Why a delay when connecting my Mac to the network? April 30, 2007
Mac OSX v Netgear Router April 28, 2007
Cross platform video-chat software. February 24, 2006
Good WYSIWYG web development software for the Mac? January 23, 2006
AirPort not letting me surf July 7, 2005