C# Performance Issues With Deleting Files
Posted on 2010-04-01
I've millions of files (<20 bytes each file though) sitting in a directory and I need to be able clean them up by date and file types. I’ve developed a quick console program using C#/2.0 basically I get the files using Directory.GetFiles() method with search options. But this appears to be performing well on directories with few hundred or so files only. What’s the best way to accomplish this task. I need to clean up files from time to time without putting lot of pressure on production servers. Thanks.