Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

jacobp

macrumors member
Original poster
Nov 14, 2007
56
0
I have my browser setup to save downloads to the Downloads folder. But within my Downloads folder I have setup subfolders to better organize the downloads.

So now, when I download a file it places the file in Downloads and does not appear to have any flexibility in allowing me to drill down one level to the appropriate subfolder.

Is there a way of setting up the Mac to allow me to do this?
 
Yes, there is. Automator can watch folders and trigger actions when the folder's content changes - for instance, you could create an action that determines the file type of new files in the Downloads folder then moves them to a subfolder of your choosing, automatically. I'm assuming you're using Leopard. If you aren't, you'll need a little AppleScript to do this, instead.
 
Thanks. But my situation is a bit different. I have subfolders in my Downloads folder that are named for the company that I am downloading the file from. So, for example, I have a HP Hardware subfolder and an Apple subfolder. It is, of course, probable that files with the same extensions would exist in both of those folders. So my question is still, is there a way to allow me to download a file and then steer the download to a specific subfolder. Thanks.
 
Ah, I see. It is still possible, but a bit more difficult. What you need is a small AppleScript that triggers as a Folder Action on the Downloads folder, moving files to subfolders based on some criteria it can identify the file by. For instance, if all your Apple downloads contain "Apple" in their filenames you can filter that way. If you're an AppleScript newbie, or don't know how to program in AppleScript, I'd be glad to write a script that does what you need.;)
 
or you could just set your browser to ask you every time where you want it to save your downloads, and then just choose the appropriate folder each time.
 
I have tried the suggestion of having the Mac ask me where I want to save downloaded files, but it does not allow me to drill down any deeper than the Downloads folder. In other words, it will not allow me to drill down to a subfolder. Any suggestions.
 
Yes, but it won't let you drill down inside one of the main folders.
 
what? if you click the blue triangle, you have access to every folder and subfolder on your computer.
 
HTML:
property image_extension_list : {"tif", "tiff", "gif", "png", "pict", "pct", "jpg", "jpeg"}
property video_extension_list : {"avi", "mov", "mpg", "mpeg", "wmv"}
property audio_extension_list : {"mp3", "wav", "mp4", "aac", "m4a", "m4b"}
property archive_extension_list : {"zip", "sit", "tar", "tgz", "gz", "bzip2"}
property documents_extension_list : {"doc", "pdf", "txt", "xls", "ppt"}
property application_extension_list : {"dmg", "hqx", "toast"}

property image_foldername : "Images"
property video_foldername : "Video"
property audio_foldername : "Audio"
property archive_foldername : "Archives"
property documents_foldername : "Documents"
property application_foldername : "Applications"


on adding folder items to this_folder after receiving added_items
	
	repeat with this_item in added_items
		tell application "Finder"
			
			if (the name extension of the this_item is in the image_extension_list) then
				my makeamove(this_item, this_folder, image_foldername)
			end if
			
			if (the name extension of the this_item is in the video_extension_list) then
				my makeamove(this_item, this_folder, video_foldername)
			end if
			
			if (the name extension of the this_item is in the audio_extension_list) then
				my makeamove(this_item, this_folder, audio_foldername)
			end if
			
			if (the name extension of the this_item is in the archive_extension_list) then
				my makeamove(this_item, this_folder, archive_foldername)
			end if
			
			if (the name extension of the this_item is in the documents_extension_list) then
				my makeamove(this_item, this_folder, documents_foldername)
			end if
			
			if (the name extension of the this_item is in the application_extension_list) then
				my makeamove(this_item, this_folder, application_foldername)
			end if
			
		end tell
	end repeat
end adding folder items to

on makeamove(this_item, root_folder, target_foldername)
	
	tell application "Finder"
		
		if not (exists folder target_foldername of root_folder) then
			make new folder at root_folder with properties {name:target_foldername}
		end if
		
		set the target_folder to folder target_foldername of root_folder
		my resolve_conflicts(this_item, root_folder, target_folder)
		move file this_item to the target_folder
		
	end tell
	
end makeamove

on resolve_conflicts(this_item, root_folder, target_folder) --renames the item if dublicate exists in target folder
	
	tell application "Finder"
		
		set file_extension to the name extension of this_item
		set the file_name to the name of this_item
		
		if the file_extension is "" then
			set the trimmed_name to the file_name
		else
			set the trimmed_name to text 1 thru -((length of file_extension) + 2) of the file_name
		end if
		
		if (exists document file file_name of target_folder) then
			
			set the name_increment to 1
			
			repeat
				set the new_name to (the trimmed_name & "_" & (name_increment as string) & "." & file_extension) as string
				
				if not (exists document file new_name of the target_folder) then
					
					set the name of document file file_name of folder root_folder to the new_name
					exit repeat
				else
					
					set the name_increment to the name_increment + 1
					
				end if
			end repeat
		end if
	end tell
	
	return the file_name
	
end resolve_conflicts
 
Assuming you are in Safari, right click on the file in question, select "Download linked file as..." and then you can select any folder or subfolder you want. To get where you want fast, make sure the Downloads folder is in your sidebar so you select it in case it is not already selected as your default (it should be unless you manually download elsewhere, in which case Safari remembers the last folder you downloaded to and automatically goes there again in the save dialog.)
 
I have this same problem did you find a solution?

The solution was properly described by CrzyCanuck72 on November 28, 2007. Just click the little blue triangle immediately to the right of the name field when saving, and you'll have access to every folder on the computer.

jW
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.