# To remove an Empty directory, Use
$ sudo rmdir folder-name
# If it is not a empty directory, then rm command can be used
$ sudo rm -rf folder-name
rm -R directory
rm -d directory
rm -f filename(s)
rm -r dirname
rm -rf dirname
//delete directory
string deleteDirectoryPath = @"C:UsersYogeshkumar HadiyaDesktopDirectoryHandling";
if (Directory.Exists(deleteDirectoryPath))
{
Directory.Delete(deleteDirectoryPath);
Console.WriteLine("Directory deleted at " + createDirectoryPath);
}
else
{
Console.WriteLine("Directory not found at " + createDirectoryPath);
}