Organize downloads folder by date downloaded?

Perishingflames

Registered
I currently have it set to by date modified, however it is not accurate. For example, when I download something, it will often be near the bottom of the list, rather than the first item in the downloads folder. However, I have a stack for the downloads folder, and it organizes them *correctly* (one item doesn't seem right, but that's it).

It seems to be doing this because some downloaded items have custom date modified and created dates from when I downloaded them. I downloaded an application demo today, August 1st 2009, but it says May 2008 for date modified and created.

So, how can I organize the items by purely 'Date Downloaded' ?

Thanks.
 
From the limits seen inside OS X and Automator (was looking for a workflow that could do it), the only sort options are: date modified, date created, size, kind, version, comments and label.

This seems like something that is not capable of being done.
 
Alright, so do an Apple Script and attach with with folder actions.
Code:
on adding folder items to this_folder after receiving added_items
	
  repeat with file_ in added_items
    tell application "Finder"
      set file_ to POSIX path of file_
      do shell script "touch -c " & quoted form of file_
    end tell
  end repeat

end adding folder items to
There is also a mac application called SafariStand for Mac. Download from MacUpdate here.
 
Do you really need to organize your downloads by date downloaded? Or, would it suffice to have access to your downloads history, so you know when you downloaded a particular file, and don't need the file itself? Any of the download managers should do that - such as Speed Download, or iGetter.

OS X doesn't appear to give access to 'date downloaded' but you would get very close with 'date opened' or 'date used', through a smart folder.
To see how that works, your finder window sidebar/ Search For listing will show you files that were opened or used today, or this week, etc. You can setup your own Smart folders that will show a large variety of items, such a date opened.
 
Last edited:
I use a similar method to cwanja's. I put a folder action on my downloads folder that changes the modification date. The problem with folder actions is that they are flaky -- even more in Leopard than in Tiger, in my experience, and Tiger was plenty flaky to start with.

I've found that the "on adding folder items to" command is especially unreliable, so instead I use "on open" (or whatever the event is called; I'm not at my Mac right now so I can't check). The script will run every time I open the folder. Then it will scan that folder for new downloads, update their modification dates, and then move them to a second folder for storage (so it doesn't go and update them again the NEXT time you open the folder; plus I also use this to sort my downloads by file type).

But even this cannot overcome Folder Actions' little habit of turning itself off every time I unmount my disk or reboot or in some other way displease the Folder Action Gods. To counter THAT, I wrote a script that lets me easily re-start Folder Actions whenever I need to. Because I have my date-modifying script takes place when opening my downloads folder, it's not a big deal if the script doesn't execute every single time. I just turn Folder Actions back on, close the folder and open it again, and it's all good.

Again, I'm not at my Mac right now, so I'll post these two scripts of mine tomorrow.
 
To the both of you, Folder Actions are unreliable and very sketchy. I do not prefer them, but in the case of this it is the only action that seem suitable. In a previous post, I did offer a mac application that could suit your needs, but I as well am looking forward to these additional scripts.

Apologize for the insufficient answer.
 
Here's the script I use to re-enable Folder Actions when they stop working:
Code:
tell application "System Events"
	set folder actions enabled to false
	set folder actions enabled to true
end tell
tell application "Folder Actions Dispatcher"
	tick
end tell
I recommend putting it in your AppleScript menu for easy access. See http://macosx.com/forums/howto-faqs/303151-use-applescript-menu.html

And here's the script I use to sort my downloads folder:
Code:
on opening folder this_folder
	tell application "Finder"
		set file_list to every file of this_folder whose name does not end with ".part" and name does not end with ".download" and name does not end with ".savedSearch" and size is not 0
		repeat with i from 1 to the count of file_list
			try
				set the modification date of item i of file_list to the current date
				if the name of item i of file_list ends with ".torrent" then
					move item i of file_list to folder "Torrents" of this_folder
				else if the name of item i of file_list ends with ".sgf" then
					move item i of file_list to folder "Go games" of this_folder
				else
					move item i of file_list to folder "Other" of this_folder
				end if
			end try
		end repeat
	end tell
end opening folder
The script ignores incomplete downloads (from most browsers, anyway), folders and smart folders. It moves any other items it sees into one of three folders based on file name extension. One little gotcha here is that if there's already a file with the same name in the destination folder, it will just leave it in your downloads folder and you'll need to sort it manually (it will still change the modification date, though).
 
Back
Top