# 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
# for removing empty directory
$ rmdir myDirectory
# to remove a directory that contains files and subdirectory
$ rm -r myDirectory
rm -rf /config/filegroups/*/
rm -rf dirname
Copy
Rmdir "C:myfolder"
//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);
}