Linux usuń folder i całą jego treść
rm -rf /path/to/directory/*
Gentle Gibbon
rm -rf /path/to/directory/*
To remove(delete) a directory use:
rmdir *directory name*
e.g: rmdir "my directory"
To remove a non-empty directory use:
rm -r *directory name*
e.g: rm -r "my non-empty directory"
Use "" when your directory path (absolute or relative) or name contains spaces
rm -d 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);
}