Select the following text:
set foldername to ("Downloads " & short date string of (current date))
set docsfolder to (path to documents folder) as string
tell application "Finder"
if not (exists folder (docsfolder & foldername)) then
make new folder at docsfolder with properties {name:foldername}
end if
move items of (path to downloads folder) to folder (docsfolder & foldername)
end tell
tell application "Finder"
move folder (docsfolder & foldername) to (path to downloads folder)
end tell
Open the Script Editor from your Utilities folder and paste the text into the 'untitled' window. Click "Compile" and then click Run if you would like to test it directly.
You can save the script as an application, placing that somewhere convenient to run when your downloads folder clogs up again. Choose File Menu... Save, and from the File Format menu choose Application.
The script works by first creating a folder in the Documents folder, then moves all the contents of the Downloads folder there, then moves that folder back into Downloads.
No comments:
Post a Comment