Haven't started on it yet.
I'm currently at work and will write the script when I get home tonight.

Google has been great in providing the solutions for the intermediate steps, but I just can't get the looping part down.