Quickly Create And Delete Directories Using Windows Command Prompt

At times, it can be quicker to make and remove directories directly from the Windows command prompt.

Here is how to do it :

1. Open Windows command prompt and to create a directory (named “testing” in this example), type :

mkdir testing

Create directory in Windows using command prompt

2. Check it out by changing to this newly created directory :

cd testing

3. To remove this empty directory, simply type :

rd testing

If the directory contains files, then the above will show a message that the directory is not empty. In that case, first use the “del” command as follows and select “Y” to remove all the files within that directory and then “rd” to remove the directory :

Removing directory using Windows command prompt

4. It is gone, try to change to that directory now and it will return an error message of specified path not found.

Deleted directory using Windows command prompt

Cheers.

Comments are closed.