Sort files based on filename

Hi, i have made some rules in Hazel that moves my episodes to a folder and renames them to “Show name - SxxExx.avi” Now i am looking at creating a applescript or something that can check every file in that folder and move them to “/Show name/Season xx/”

The best would be if it could do a check to see if the folders exist and create them if they do not.

Does anyone have any examples or tutorials?