move files by date

Ok so iphoto isnt as good as it should be, iview media pro is better but lacks a few important abilities which means I am in the need of a script that can do the following.

Take a folder full of files (images and videos) and then move each file into a folder structure according to date - preferably the exif date or the date created if not…

The folder structure should/could follow the one iphoto uses


Anyone help me with this??

cheers for the help