I'm sorry I took so long to respond to your suggestion but it takes a while for my script to run and I wanted to let it finish before I replied. I was very intrigued by your idea. I was planning on implementing forking but not until after I had everything else working. Regardless, I went ahead and put it in. And it worked! 846 files and no 'Out of Memory' errors.
Thank you very much for the help