CSharp examples for File IO:Directory
Clear Directory
using System.IO ; using System.Windows.Forms ; using System;/*from w ww . j a v a 2 s.c o m*/ public class Main{ public static void ClearDirectory(string dirPath) { string[] filePaths = Directory.GetFiles(dirPath); foreach (string file in filePaths) { File.Delete(file); } } }