Downloaded File Dates/Finder Organization

Posted:
in macOS edited January 2014
I've been searching for a solution to my problem for a while. Decided the best place to ask would be in a forum where pretty much everyone has a mac, Very Happy



Basically I have been searching for ever to find a way to make Finder (OSX Panther) display files in a folder in the order that they were downloaded/put in there. There's an extreme lack of ways to display files in Finder (sorting by metadata)



Having a Downloads folder is about worthless. It refuses to display files in the order they were downloaded. Sort by Date/Creation/Modification doesn't work either. It seems that the files you download are sorted by the dates they were created on BEFORE you download them. Like if someone created an mp3 file 3 years ago, and I download it today, it displays it December 2nd, 2003 instead of the current date, and in turn throwing it in some random place in my folder.



I figured there would be some type of applescript out there to fix this problem. But I haven't found any answers.



Someone suggested maybe an applescript could be created that applied the latest date and time to a file once they are inserted into the Downloads/Incoming folder.



I know nothing about Applescript, but I would like to know if it's possible. I'm willing to learn it. Also, since I will be getting a Powerbook soon (with Tiger) I'd like someone to check to see if it's possible to do this in Automator.



Thanks in advance to anyone that can help..in the meantime I'll be browing around the forums and site.

Comments

  • Reply 1 of 7
    kickahakickaha Posts: 8,760member
    Yeah, that's possible. Make a Folder Action that, on adding a file or folder, changes the file modification date to the current timestamp. Attach it to your Downloads folder. Voila.
  • Reply 2 of 7
    There are to timestamps. Modification Date, and Creation Date. I guess the one I need to modify is the Modification Date.



    I've been trying to find a script to do this, but not much luck. Trying to find something premade. I don't know how to code in applescript... so I'd have to learn it.



    Out of curiousity though, do any of you guys know if it's an action already in Automator?
  • Reply 3 of 7
    lundylundy Posts: 4,466member
    Quote:

    Originally posted by spazzedout

    There are to timestamps. Modification Date, and Creation Date. I guess the one I need to modify is the Modification Date.



    I've been trying to find a script to do this, but not much luck. Trying to find something premade. I don't know how to code in applescript... so I'd have to learn it.



    Out of curiousity though, do any of you guys know if it's an action already in Automator?




    Here is the script:



    Code:




    on adding folder items to this_folder after receiving these_items

    repeat with theItem in these_items

    tell application "Finder" to set modification date of theItem to current date

    end repeat

    end adding folder items to











    Save that script with whatever name you want in ~/Library/Scripts/Folder Action Scripts.



    Then open the Folder Actions Setup application in (Applications/Applescript).



    Choose the folder that you want the action to be attached to on the left and the script that you just saved on the right.



    Done.
  • Reply 4 of 7
    YES! Thank you so much! That does exactly what I need it to do. I'm amazed at what a simple script it is too.



    Now I can hate the Finder less. lol.
  • Reply 5 of 7
    Quote:

    Originally posted by lundy

    Here is the script:



    Code:




    on adding folder items to this_folder after receiving these_items

    repeat with theItem in these_items

    tell application "Finder" to set modification date of theItem to current date

    end repeat

    end adding folder items to











    Save that script with whatever name you want in ~/Library/Scripts/Folder Action Scripts.



    Then open the Folder Actions Setup application in (Applications/Applescript).



    Choose the folder that you want the action to be attached to on the left and the script that you just saved on the right.



    Done.



    Wow, thank you lundy. I wasn't exactly in the ball for that

    script, but it came in pretty handy.
  • Reply 6 of 7
    lundylundy Posts: 4,466member
    My pleasure. Applescript can do a lot of things.



    If you ever need to stop this behavior of the folder, you can just bring up the Folder Actions Setup utility again and uncheck that folder or that script.



    Also, when someone posts code for a script, you can (in Safari) just highlight the lines of the script and choose "Make New Applescript" from the Safari->Services-> Script Editor menu. Then when you click on the Script Editor in the Dock to switch to it, the script will be there compiled and ready to be saved. Try it with the code between the horizontal lines in my other post.
  • Reply 7 of 7
    Quote:

    Originally posted by lundy

    My pleasure. Applescript can do a lot of things.



    If you ever need to stop this behavior of the folder, you can just bring up the Folder Actions Setup utility again and uncheck that folder or that script.



    Also, when someone posts code for a script, you can (in Safari) just highlight the lines of the script and choose "Make New Applescript" from the Safari->Services-> Script Editor menu. Then when you click on the Script Editor in the Dock to switch to it, the script will be there compiled and ready to be saved. Try it with the code between the horizontal lines in my other post.




    gorgeous
Sign In or Register to comment.