How to delete complete folder and files from Window System using Command line?

by deveshjain May 11 in Linux Command 0 Comments 166 Views

How to delete complete folder and files from Window System using Command line?

You can use below command:

Delete Folder:

rmdir /S

Example: rmdir /S testing

After paste above command the follow message will come:

testing, Are you sure (Y/N)?

You can type "Y" to delete complete folder.


Deleting a subdirectory:

rmdir \SUB DIRECTORY NAME


Example: rmdir example\test


Delete File:

del example.txt


Example: del test.text


The del command can be used to delete any file.


Delete multiple files:

del *.txt


In the above example, this command would delete all files that end with a .txt file extension.