How to delete folder from command line in Windows 10 ?

You can delete a directory or folder using the command “rmdir” from commandline in Windows 10.

How to delete folder from command line in Windows 10 ?

The syntax for deleting the folder in windows 10 is

rmdir <name of the directory>

Incase you want to delete the non-empty folder , you can use the parameter /s for the rmdir command.

Below is an example demonstrating the deletion of the directory in windows.

D:\>rmdir abundantcode1
The directory is not empty.

D:\>rmdir /s abundantcode1
abundantcode1, Are you sure (Y/N)? Y
The directory is not empty.

D:\>
image