Share this article

Improve this guide

FIX: The directory cannot be removed error message

6 min. read

Updated onOctober 4, 2023

updated onOctober 4, 2023

Share this article

Improve this guide

Read our disclosure page to find out how can you help Windows Report sustain the editorial teamRead more

Key notes

If you’re getting theERROR_CURRENT_DIRECTORYerror code withThe directory cannot be removeddescription, follow the troubleshooting steps listed in this article.

Also known as error 16 (0x10), the ‘ERROR_CURRENT_DIRECTORY’ error code occurs when users try to delete a directory from their PC. This error occurs due to one of the following reasons:

This error may also occur when setting up your Windows account. In this case, the error is accompanied by the following description:Something went wrong. Please try again later. Error 0x80090010: The directory cannot be removed.

How do I fix The directory cannot be removed error?

How do I fix The directory cannot be removed error?

1. Correct the directory name

Make sure that the directory name is written correctly. Use simple directory names, and avoid extended characters and spaces which may trigger this type of error. Use any characters within a-z, A-Z and 0-9.

2. Empty the directory

Remove all the files and subdirectories from the directory, and then try to delete it again. Sometimes, the files located inside the problematic directory may prevent you from deleting it. After removing all the files and folders from the respective directory, users are able to delete it.

3. Use the Chdir command

Thechdircommand displays the name of the current directory or changes the current folder. If you use it with only a drive letter, it displays the names of the current drive and folder. If you use it without parameters, chdir displays the current drive and directory. In this particular situation, you’re going to use this command to change the current directory in all sessions that might be using it.

For more information about the chdir command and how to use it in various contexts, go toMicrosoft’s Support page.

4. Use the RMDIR command

The RMDIR command allows you to completely remove directories. However, this command comes with a few limitations:

Example: If you want to delete the MyDir directory, use this command: rmdir /s / mydir. If you wantCommand Promptto delete the directory without asking for confirmation, type this command: rmdir /s /q mydir.

5. Remove the device with the directory name

If the directory name is the same as an installed device, simply remove the device. This should fix the problem and you should be able to remove the directory.

6. Repair your registry

The easiest way to repair your registry is to use a dedicated tool, such asCCleaner. Don’t forget to first backup your registry in case anything goes wrong.If you haven’t installed any registry cleaner on your computer, check out our article onthe best registry cleaners to useon Windows 10 PCs.

You can also use Microsoft’sSystem File Checkerto check for system file corruption.

7. Run a full system scan

Malware may cause various issues on your computer, includingerrors. Perform a full system scan in order to detect any malware running on your computer. You can use Windows’ built-in antivirus, Windows Defender, orthird-party antivirussolutions.

8. Check your disk for errors

9. Check the permissions on the drive

  1. In the new window, click on Users > click on the Change permissions button

  2. Select Users one more time > go to Edit

  3. Under basic permissions, check Full control > OK.

TheERROR_CURRENT_DIRECTORYerror code may also occur if you don’t have the necessary permissions to access the drive where the problematic directory is located. Use the steps above to verify the permissions on the respective drive and change them to full control.

However, keep in mind that if you restart your computer or switch users, these settings will revert to default.

10. Boot into Safe Mode

  1. Wait until Windows 10 reboots, and select  Safe Mode.5. Delete the problematic directory > restart your computer > check if the problem still persists.

11. Use another OS

If you own adual-boot system, simply boot into another operating system and try deleting the directory from there. For more information on how to boot Windows with another operating system, check outour dedicated article.

We hope that the solutions listed above helped you fix The directory cannot be removed error. If you’ve come across other workarounds to fix this problem, you can help the Windows community by listing the troubleshooting steps in the comments below.

More about the topics:System Errors,windows registry

Madalina Dinita

Networking & Security Specialist

Madalina has been a Windows fan ever since she got her hands on her first Windows XP computer.

She is interested in all things technology, especially emerging technologies – AI and DNA computing in particular.

Prior to joining the WindowsReport team, she worked in the corporate world for a number of years.

User forum

0 messages

Sort by:LatestOldestMost Votes

Comment*

Name*

Email*

Commenting as.Not you?

Save information for future comments

Comment

Δ

Madalina Dinita

Networking & Security Specialist

Madalina is a Windows fan since forever, especially interested in AI, emerging technologies, privacy, and security.