I have a huge file repository of images that has tens of thousands of files and probably close to as many folders. I thought I'd write a quick script or app that will recurse through the folders and subfolders, check to see if the image is an animation, and if not, delete the file. It was easy with the 1 or 2 test files but I'm getting an "Out Of Memory" exception when I try to do it with a folder that contains more than 200 files. I've attached my vb.NET form1.vb file.
The form only has 1 "Start" button to kick the process off.