Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

A script to sort the Downloads folder by download date Internet
I like to have a Downloads folder with files sorted by download date. However, I have not found this option in OS X, because the files' dates are not modified on download. So I modified a small script that updates the modification date of files. Attach this AppleScript to your download folder via Folder Actions, and now you only have to put the folder in list mode, and sort by modification date. Hope it helps.
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
The problem I have found with this is that you lost the real modification date, but sometimes this is a secondary issue. Perhaps the script can be modified to save the modification date in the notes field.

[robg adds: Back in 2003, we ran this hint, which pointed to a small script called FolderOrgX. FolderOrgX organizes your downloads into subfolders by date of download, and seems to still work fine with Safari (it doesn't work well with Firefox, Camino, and other Gecko-based browsers). It offers the option to touch or not touch the modification date of the file, so you can retain that info if you wish. I chose to run this hint, despite its similarities with the older one, for non-Safari users and those who would rather not use subfolders in their downloads folder.]
    •    
  • Currently 1.80 / 5
  You rated: 1 / 5 (10 votes cast)
 
[15,573 views]  

A script to sort the Downloads folder by download date | 4 comments | Create New Account
Click here to return to the 'A script to sort the Downloads folder by download date' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
A script to sort the Downloads folder by download date
Authored by: vingt on Nov 15, '06 07:58:02AM
For Safari users, the free SafariStand 2.0b17 plug-in offers this capability as a selectable option.

[ Reply to This | # ]
A script to sort the Downloads folder by download date
Authored by: redsweater on Nov 15, '06 08:44:03AM
A more general solution for situations like this is provided by Noodlesoft's "Hazel" application. It can be configured to tidy up various folders on your Mac. Very cool:

http://www.noodlesoft.com/hazel.html

Daniel

---
--
Daniel Jalkut
http://www.red-sweater.com/

[ Reply to This | # ]

A script to sort the Downloads folder by download date
Authored by: stephenhart on Nov 15, '06 09:20:42AM

I organize a folder called "Current Updaters" by date downloaded, then occasionally sort by this date and burn older updaters to CD. I couldn't find a way to do this with Automator, and I'm no AppleScript guru, so I reverted to QuicKeys.

I set up a QuicKey that invokes Get Info, inserts the current short date in Spotlight Comments, then moves the file from Download to Current Updaters.

One downside is that I have to do one file at a time. Another is that the QuicKey move will fail if there's already a file with the same name in Current Updaters.



[ Reply to This | # ]
A script to sort the Downloads folder by download date
Authored by: CoolerQ on Nov 16, '06 08:57:14AM
This information is saved, but it's just not exposed easily to the Finder. In the terminal, for instance, ls -l --time=ctime --sort=time will display a list sorted by the creation time, which is not the same as the "date created" that the finder shows. (For geeks: the "ctime" is the inode modification time; it changes when the file is created or renamed.)

--Quentin

[ Reply to This | # ]