A script to sort the Downloads folder by download date
Nov 15, '06 07:30:02AM • Contributed by: dariogf
Nov 15, '06 07:30:02AM • Contributed by: dariogf
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.
[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.]
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.]
•
[16,144 views]
