using System;
using System.IO;
class Test
{
public static void Main()
{
// Specify the directories you want to manipulate.
string path = @"c:\MyDir";
string subPath = @"c:\MyDir\temp";
try
{
Console.WriteLine("I am about to attempt to delete {0}", path);
Directory.Delete(path, true);
Console.WriteLine("The Delete operation was successful.");
}
catch (Exception e)
{
Console.WriteLine("The process failed: {0}", e.ToString());
}
finally {}
}
}