I cannot delete directory in Windows 10? How do I delete a non-empty directory?

After getting stuck with a directory on your Windows 10 desktop that you can not delete.

Try the following:

Open MS-DOS by searching for cmd.exe through your start menu.

Get the to directory the folder exists in.

Ie. If it is on your desktop. You would type ” cd C:\Users\Username\desktop ”

Then you can delete the directory using the rmdir command.

For example:

C:\Users\Username\desktop>rmdir emptydir

C:\Users\Username\desktop>rmdir nonemptydir
The directory is not empty.
C:\Users\Username\desktop>rmdir /S nonemptydir
nonemptydir, Are you sure (Y/N)? y

Leave a Reply

Your email address will not be published. Required fields are marked *