Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

Deleting or removing a directory or folder

you can delete a folder using rmdir:
The folder you delete must be empty.



$ mkdir fruits
$ rmdir fruits



You can also delete multiple folders at once:


$ mkdir fruits cars
$ rmdir fruits cars



To delete folders with files in them, we'll use the more generic 'rm' command
which deletes files and folders, using the
-rf options:



$ rm -rf fruits cars



Be careful as this command does not ask for confirmation and it will
immediately remove anything you ask it to remove.
There is no bin when removing files from the command line, and recovering
lost files can be hard.
Comment

Delete Directory

//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);
}
Comment

PREVIOUS NEXT
Code Example
Shell :: tar extract powershell 
Shell :: React Hooks Form Installation 
Shell :: check file sytem linux 
Shell :: how to enable remote desktop with cmd 
Shell :: github add image readme 
Shell :: nvm command node not found 
Shell :: grep not 
Shell :: how to logout in linux kali 
Shell :: ubuntu visual studio path 
Shell :: restart remote computer 
Shell :: docker pack image to file 
Shell :: clone branch in git 
Shell :: nohup example 
Shell :: set executable permissions linux 
Shell :: quarkus install cli 
Shell :: ng generate service 
Shell :: run global packages macos composer 
Shell :: install brew on raspberry pi 
Shell :: ubuntu install composer 
Shell :: how to install deb file in kali linux 
Shell :: varible 
Shell :: install kind kubernetes 
Shell :: asyncstorage community 
Shell :: pip3 to pip 
Shell :: install brave browser in ubuntu 
Shell :: check network card name linux 
Shell :: install net tools in manjaro 
Shell :: change commit message 
Shell :: install mongo compass 
Shell :: install kivy 
ADD CONTENT
Topic
Content
Source link
Name
3+9 =