Beta
×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

Apple script to sort directory as you add files to it

commonchaos (309500) writes | more than 9 years ago

OS X 0

This was written because I never like to delete stuff from my "Downloads" directory. I hate having to look through the directory for the last thing that I downloaded, that is where this comes in.

I have my browsers configured to not open my files after download, if I did, I would probably configure the delay to be more like 10 minutes or so.

This was written because I never like to delete stuff from my "Downloads" directory. I hate having to look through the directory for the last thing that I downloaded, that is where this comes in.

I have my browsers configured to not open my files after download, if I did, I would probably configure the delay to be more like 10 minutes or so.

on adding folder items to this_folder after receiving these_items
    tell application "Finder"
        set theDate to current date
        set todayDate to month of theDate & " " & day of theDate & ", " & year of theDate as text
 
        if not (exists folder todayDate of this_folder) then
            set the target_folder to (make new folder at this_folder with properties {name:todayDate})
            delay 2
        else
            set the target_folder to folder todayDate of this_folder
        end if
 
        repeat with i from 1 to number of items in these_items
            set this_item to item i of these_items
 
            move this_item to the target_folder
        end repeat
    end tell
end adding folder items to

cancel ×

0 comments

Sorry! There are no comments related to the filter you selected.

Check for New Comments
Slashdot Login

Need an Account?

Forgot your password?