How to Fix Files or Folders that Cannot be Deleted

How to Fix Files or Folders that Cannot be Deleted

/ Shayne Sherman

(The action can’t be completed because the folder or a file in it is open in another program)

Dealing with files or folders that refuse to be deleted can be frustrating, especially when you’re trying to tidy up your computer. Fortunately, there are several methods you can try to resolve this issue. The following steps are designed to help you remove stubborn files or folders by addressing common causes that prevent their deletion.

Method 1: Perform a Reboot

Often, the simple act of rebooting your computer can resolve the issue by stopping all processes that might be using the file or folder. Follow these steps:

  1. Shutdown Your Computer: This terminates all running programs, including any that might be using the file or folder you’re attempting to delete.
  2. Unplug Your Computer: This ensures all components, especially RAM, are fully powered down, clearing temporary data.
  3. Press the Power Button for About 10 Seconds: This discharges any residual electrical charge in the capacitors, clearing the RAM of any lingering data that might include processes preventing your file from being deleted.
  4. Plug in Your Computer and Start It Normally: A fresh start for all systems, clearing out temporary files and processes that were previously running.
  5. Attempt to Delete the File or Folder Again: With the system refreshed, you should now be able to delete the problematic file or folder.

Method 2: Restart Windows Explorer

Windows Explorer (or File Explorer) is an essential component of the Windows operating system, responsible for managing files and folders. If it encounters an error or glitch, it might prevent the deletion of files. Here’s how to restart Windows Explorer:

  1. Open Task Manager: Press Ctrl + Shift + Esc to open the Task Manager, which allows you to manage running applications and processes.

2. Locate Windows Explorer: Find Windows Explorer in the Processes tab. It’s responsible for the desktop, taskbar, and file management.

process tab

3. Restart Windows Explorer: Select Windows Explorer and click on the Restart option. This action refreshes the process, potentially fixing the issue preventing file deletion.

end windows explorer task

4. Try Deleting the File Again: After restarting Windows Explorer, attempt to delete the file or folder once more. The restart may have resolved any errors that were preventing the deletion.

Method 3: Use Resource Monitor

After attempting the initial troubleshooting steps without success, another powerful tool at your disposal is the Resource Monitor. This utility provides detailed system information, including which processes are using specific files or folders. By identifying and stopping these processes, you may be able to delete the file or folder that was previously locked.

  1. Open Run Command: Press the Windows key + R to open the Run command dialog box.

2. Launch Resource Monitor: Type resmon.exe into the Run command box and click OK or press Enter. This action opens the Resource Monitor application.

resmon exe command

3. Navigate to the CPU Tab: Once Resource Monitor is open, click on the CPU tab to view a list of running processes and their associated handles.

4. Use the Associated Handles Section: In the CPU tab, look for the “Associated Handles” section. This area allows you to search for specific file names or paths to see which processes are using them.

resource monitor

5. Search for Your File or Folder: Enter the name of the file or folder you’re trying to delete into the search box in the Associated Handles section. Press Enter to initiate the search.

copy filename

6. Identify the Process Using the File: The search results will show which process is using the file or folder. This information includes the name of the process.

7. End the Process: Right-click on the process that is using the file or folder you wish to delete and select “End Process.” Be cautious with this step, as ending critical system processes can cause system instability.

associated handles

8. Attempt to Delete the File or Folder Again: After ending the process that was using the file or folder, try to delete it once more. Without the process locking it, deletion should now be possible.

Shayne Sherman
Meet the author

Shayne is an expert on all things Microsoft Windows and computer security. As a Windows user of over 30 years, he has been featured on Business Insider, Yahoo, Tech Republic, Hacker Noon, Techopedia, and many other publications. Aside from entertaining at his home theater, he enjoys spending time with his family, including his English bulldog, Fergie.