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

.mark.

macrumors 6502
Original poster
May 28, 2007
266
1
Jersey, C.I.
I'm using the drawers icons with stacks in leopard and I love them. The only problem I'm having is with the icon for the download stack. The meta data is set ok for the date modified and date created but i want to order the stack by date added. I googled around a bit and found that using the touch command from the terminal you can edit the date modified and created but does anyone know how I can modify the a file's "date added" so I can have the stack ordered by date added and keep my icon at the front?
 
Found this thread while searching Google. I would like to know this too, there must be a way through terminal or something?
 
Another one coming through Google. This is really frustrating -- Date Modified just isn't cutting it here!
 
If you change the date on your computer to the date you want and save the files with a different name then it'll save it with that date... although with a lot of files this would be really tedious... and dont forget to change the date back
 
Hello, stumbled here via google also :)

Having not found an easy way to change the Date Added variable, I wrote a small script that does the following:

Every time a file is added to the Downloads folder, it deletes the drawer icon and copies it back in, hence making it the last file added, ie on top of the stack :) The delete is direct (ie no trash can).

Using the script is easy, all the instructions are within it. Just download the attached .zip and put it in ~/Library/Scripts/Folder Actions Scripts. Unzip it there and open the cdo.scrpt file for further instructions.

This is a very crude fix, and the script just runs a CLI script to delete and copy the folder icon. Still, it works and will let us have a nice stack with an icon that is arranged by Date Added.

Hope this helps until someone more clever fixes it properly ;)

Any questions let me know.
 

Attachments

  • cdo.zip
    3.3 KB · Views: 713
what does ~ mean again, home library or the mac hd library???

I tried doing thos but it is not working?
 
As far as i can see, the only effective way to keep a file/folder on top of a stack using "Date Added" sorting is to move the file/folder via applescript as in Sobtanian's post.

For the curious, one can easily edit the SQLite database file ~/Library/Preferences/com.apple.dock.db to change the order of the files in a stack. Unfortunately, this is a futile effort toward our goal. When a new file is added to a stack, a new entry is added to the database with the order number set to one more than the highest order number presently in the database. In other words, if you change the order number of your stack overlay to 99999999998, the next file added to the stack will be given the order number 99999999999, putting it on top.
 
What if you go to Terminal and do a:
Code:
touch <directory or filename>
 
Sorry for necro-posting. Found thins thread via Google, but didn't like the solution of a script. So I found a solution with Folder Actions in Automator.

Here are the steps:
1. http://dl.dropbox.com/u/588592/lj/automator-date-added.png (just a screenshot of the actions)
2. File -> Save -> Enter the name for your new action.

Now everytime any file goes to the Downloads folder, the Folder Action runs automatically and moves the icon file back and forth making it the last file added to the folder.
 
Found thins thread via Google, but didn't like the solution of a script. So I found a solution with Folder Actions in Automator.

That works too, but believe it or not, both solutions are identical. The only difference is that you are using Automator to write your folder action rather than straight applescript. As a software engineer, I naturally think in code and don't mess with Autormator much, but your method is obviously an easy shortcut, so virtual high-five on that. ;)
 
Hello, stumbled here via google also :)

Having not found an easy way to change the Date Added variable, I wrote a small script that does the following:

If you own Noodlesoft's Hazel, doing this is trivial and doesn't require Folder Actions to be enabled separately. Here's how I did it. I created a new rule for the Downloads folder, I called it "Move Downloads Icon to Top." Here's how I set up the rule. (Note: any text after a "#" sign is a comment from me and is not part of the rule)

If ALL of the following conditions are met:
* Any File
* Name does not contain ".download" # otherwise every time you start downloading a file in Safari, this rule would fire
* Name does not contain "Download" # my download drawer icon is named "Download.app", so we don't want the rule to trigger whenever it gets re-copied in

Do the following to the matched file or folder:
* Run shell script:
cp -a $HOME/Downloads/*ownload*.app /tmp; rm -rf $HOME/Downloads/*ownload*.app; cp -a /tmp/*ownload*.app $HOME/Downloads

# Note that my version copies the file into /tmp, deletes it, then re-copies it back in, avoiding the need to keep a template copy of it in some other location.
 
'A better finder attributes' is worth trying, its simple to use and helped me out a lot of times with an 'autoUpdater' application I created for the company.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.