Here are some simple methods that you can use to resolve the “Unable to delete directory on Windows” problem.
- Reboot your system.
- Use CCleaner.
- Check your antivirus software.
- Using the command line, delete the file / folder. Go to Search and type cmd.
- Change the owner of the file / folder.
- Enable the hidden administrator account.
- Uninstall the AMD uninstaller.
- Use Microsoft troubleshooters.
What is the exact path to the folder you want to delete?
Your unsuccessful attempts to take possession of the object are a permission issue. However, some folders also contain symbolic links or mount points, which lead to strange scenarios that prevent Windows from displaying invalid error messages. In these circumstances, I usually have better luck with the command line.
Perhaps trying to resolve any of the following issues on the administrative command line and posting the results (if that doesn’t work) will help us diagnose your issue.
rmdir / s / q C: ProgramData FolderToDelete
Or create an empty folder somewhere and then use RoboCopy to delete the contents of the folder you want to delete.
robocopy C: EmptyFolder C: ProgramData FolderToDelete / purge
After clearing the folder with the above RoboCooy command, you can delete it using normal explorer methods or the previous
rmdir command. …
Why Can’t I Delete A File On Windows 10/8/7?
Sometimes you come across a folder that cannot be deleted. If you want to decideGiven this problem, you first need to figure out why. Usually the file is in use or locked. This is the main reason. Otherwise, the presence of a virus should be considered.
This is likely due to the fact that some other program is currently trying to use the file. This can happen even if no program is running. If a file is opened by another application or process, Windows 10 puts the file in a locked state and you cannot delete, edit, or move it to another location. Usually, when the file is no longer in use, the application will automatically unlock it. However, this is not always the case. Sometimes a file cannot be unlocked properly, and even if you try to perform an action, you will receive a warning that the operation cannot be completed because it was opened by another program.
Also Read: How to Fix 100% Disk Usage in Task Manager
Before taking any action to delete non-erasable files, you can try these simple tips first and delete the following filesly:
- Close all programs.
- Restart your computer.
- Allow the antivirus to scan your computer to determine if it has a virus and remove it.
If these files still exist, the following methods will come in handy.