I have a requirement to delete all files in a directory, except for the 5 that were created the longest time ago. So if I have a directory with files that were created on.
11/6/2010, 11/5/2010, 11/4/2010, 11/3/2010, 11/2/2010, 11/1/2010
The only file to be deleted would be the one created on 11/6/2010. What is the best way to do this in ASP.NET?