private void deletefile(System.IO.DirectoryInfo path) { foreach(System.IO.DirectoryInfo d in path.GetDirectories()) { deletefile(d); } foreach(System.IO.FileInfo f in path.GetFiles()) { f.Delete(); } }