public static void DeleteDirectory(string path) { if (Directory.Exists(path)) { Directory.Delete(path, true); } }