I am really growing fond of Applescript. The syntax isn’t all that, true, but the little problems it can solve just makes life so much more pleasant.

Today, I decided to set up a folder action on my downloads folder to sort downloaded files in folders per type.

I got this script from a bulletin board somewhere (I can’t remember which one though.)

How this work is if I download a .dmg file to my ~/Downloads/ folder, the folder action will put that file in ~/Downloads/Archives for me. Likewise a .avi file will be put into ~/Downloads/Video directory. The same thing applies for any filetype I have defined in the sort script.

How to get this working.

  • Save the script to ~/Library/Scripts/Folder Action Scripts
  • Right click (or ⌃-click) the folder you want to set up.
  • Select Configure Folder Actions

folder actions
folder actions

  • In the window you get now, enable folder actions, add your folder, and add the action you just downloaded.

folder actions setup
folder actions setup

  • Edit the script to suit your needs.

That’s it!

Your folder action is set up, download away!