Off the top of my head I can't remember and I'm at a winpoo computer right now, but this can be down with find;
find /a/dir* -mtime +7 -exec rm {} ;
This will delete all files in a directory that are 7 days old, obviously 'man find' and 'man rm' are going to help. Since you want to delete the containing folder also perhaps nest this in a loop, with an outter loop deleting the folder if its empty because the inner loop cleared it out because the files inside met your age criteria...Dangerous, but I like it! :D