Sunday, July 4, 2010

Delete Files in C#


I wrote this little application to delete old files in given directories. This application essentially deletes old files, more than x amount of days old. It deletes files in a given list:

foreach (object o in lstDeleteMe.Items)
{
  try
  {
    File.Delete(o.ToString());
  }
    catch (Exception ex) {}
}

No comments:

Post a Comment

Generating "Always On Top" NSWindow in macOS across all detected displays

Also: Using UIKit & Cocoa Frameworks using Objective-C In m acOS or OS X , written in either Objective-C or Swift  Langues, you m...