Home News Solution When Directory Cannot Be Deleted In Windows Problem

Solution When Directory Cannot Be Deleted In Windows Problem



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.

unable to delete directory in windows

If these files still exist, the following methods will come in handy.

Screenshot of David erfi

Then I right-clicked the Lassen folder, selected the 7-Zip option from the context menu, and clicked Add to Archive. An unconventional move? Yes. Let me finish

Then I activated the “Delete files after compression” option in the 7-Zip “Add to archive” window. And it’s all. I clicked OK to launch the application that created a .7z archive file of my empty Omit folder and removed it from explorer. Poof!

After deleting this strange folder, I went back to the top level folder and did a simple drag and drop deletion, erasing the entire folder tree.

I still don’t quite understand how and why this trick solved my problem of identifying and removing what Windows could not. To make sure I’m not crazy, I made a previous backup of the subfolders and tried to delete everything by having a 7 zip archive and deleting the top level folder. No chance. If I hadn’t killed the buried secret, her parents would not have left. Quote it in the article Windows Quirks That Drive You Crazy.

G / O Media may receive commission



How do I force delete a folder in Windows?

To do this, first open the Start Menu (Windows key), type run and press Enter. In the dialog box that appears, type cmd and press Enter again. In the open command line, enter the filename del / f, where filename is the name of the file (s) (you can specify multiple files with commas) you want to delete.

How do I delete files that won’t delete on my computer?

How to delete files that will not be deleted
  1. Method 1. Close applications.
  2. Method 2. Close Windows Explorer.
  3. Method 3. Restart Windows.
  4. Method 4. Use Safe Mode.
  5. Method 5. Use an application to uninstall the software.