Removing files that are older than some number of days
<p>I guess this is a pretty common requirement in a application that does quite a bit of logging. I am working on a C# Windows application, .NET 3.5.</p>

<p>My app generates tons of log files which has a current date put in the file name like so 20091112. What would be the best strategy to remove files older than say 30 days. 
One approach I am about to use it, is to loop through the file names, extract the date part, convert into DateTime object and compare with today's date. 
Is there an elegant Regular Expression solution to this :) ? Or something better?</p>
