Geeks With Blogs
Flippin IT The blog of Andrew Winn January 2010 Entries
Delete old history files
Although you can list and delete files using the .NET Framework IO classes. I found that when a large amount of files are in a directory and only a handful of files need deleting then each file needs it's date stamp checking. What I wanted was a way to get a list of only the files that where older than a specific date and then delete them reducing the loop processing to a minimal. Source Code Private Sub DeleteOldHistoryFiles(ByVal folderPath As String, ByVal keepHistoryDays As Integer) If IO.Directory.Exists(folderP... ......

Posted On Friday, January 29, 2010 9:14 AM

Copyright © Flippin IT | Powered by: