What is the cleanest way to delete all files before date X in a
directory?  Basically I'm going to set up a timer to clean out files
that are older than 20 days.  Up to now what I've been doing is getting
a list of all the files in the directory and then systematically going
through each one, and looking at it's IO.FileInfo to look at the
.CreationTime, do a comparison and then do a .Delete() if necc.

Is there a better way to do this?
=Blain

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to