Delete Directory

81

linux remove folder and all his content -

rm -rf /path/to/directory

Delete Directory -

//delete directory
string deleteDirectoryPath = @"C:\Users\Yogeshkumar Hadiya\Desktop\DirectoryHandling";
if (Directory.Exists(deleteDirectoryPath))
{
    Directory.Delete(deleteDirectoryPath);
    Console.WriteLine("Directory deleted at " + createDirectoryPath);
}
else
{
    Console.WriteLine("Directory not found at " + createDirectoryPath);
}

Comments

Submit
0 Comments