TECHNOLOGY

How to find and delete stubborn files and folders that cannot be deleted on Windows 11

Sometimes when you delete files and folders, Windows may give you the error message “the action can’t be completed because the folder or a file in it is open in another program” telling you that it “couldn’t be completed”. task because the folder or file in it is open in another program”. This is a big inconvenience, especially since Windows never tells you exactly which program is using this file. Sometimes it is also due to a software or a virus that prevents you from deleting files / folders on Windows.

So today we’re looking at how to identify all files that are in unauthorized use and release the lock on the file or directory that’s preventing you from deleting.

Windows 10 compatibility note  : Although the screenshots used in this tutorial are of Windows 11 , the methods mentioned here should work fine on Windows 10 as well.

How to find all files/folders currently in use

Here are the top two ways to find out which files or folders are being used by an application or service on Windows 11.

Method #01: Use Microsoft Process Explorer

Microsoft has a ‘Process Explorer’ application that is much more powerful than the Task Manager in identifying the application that is locking the file or folder and preventing you from making changes to it. 

How to find and delete stubborn files and folders that cannot be deleted on Windows 11

Once downloaded, right click on the zip file and click   Extract All  .

How to find and delete stubborn files and folders that cannot be deleted on Windows 11

Choose a location to extract, then click   Extract  .

How to find and delete stubborn files and folders that cannot be deleted on Windows 11

Then run the executable for Process Explorer.

How to find and delete stubborn files and folders that cannot be deleted on Windows 11

1.1 How to find out which programs are using files/folders

Once the Process explorer opens, you’ll see a ‘cross’ icon in the toolbar at the top.

How to find and delete stubborn files and folders that cannot be deleted on Windows 11

Drag and drop this icon onto the “File/Folder In Use” error message.

How to find and delete stubborn files and folders that cannot be deleted on Windows 11

This will highlight Process Explorer in the list that displays the process.

1.2 How to unlock files/folders

Once the process is highlighted (in blue), you’ll see exactly which apps are locking it from being changed or deleted (in purple).

How to find and delete stubborn files and folders that cannot be deleted on Windows 11

To unlock it, you will have to kill the process marked in purple. To do this, click on the program to select it.

How to find and delete stubborn files and folders that cannot be deleted on Windows 11

Then press the delete key. When asked to confirm, click   OK  .

How to find and delete stubborn files and folders that cannot be deleted on Windows 11

Now you can delete, rename or edit the file as you like.

Related:  How to Use Focus Assist on Windows 11

Method #02: Use Resource Monitor

Windows has a built-in tool called Resource Monitor that allows you to find the application that is locking files and folders. Here’s how you can use it:

Click Start, type ‘Resource Monitor’, then select the first option.

How to find and delete stubborn files and folders that cannot be deleted on Windows 11

In Resource Monitor, click the CPU tab   to switch to that tab.

How to find and delete stubborn files and folders that cannot be deleted on Windows 11

Then click on the ‘Search Engine’ field next to Linking Tools    .

How to find and delete stubborn files and folders that cannot be deleted on Windows 11

Searching for files or folders is restricted. In our case, it’s a movie file. As soon as you enter the file/folder name (even part of the name suffices), you’ll see the app is locking the file from being deleted.

How to find and delete stubborn files and folders that cannot be deleted on Windows 11

If you want to end this process right here, right click on it and select   End Process  .

How to find and delete stubborn files and folders that cannot be deleted on Windows 11

Click   End Process  when asked to confirm.

How to find and delete stubborn files and folders that cannot be deleted on Windows 11

The file is now unlocked and you can make changes to it as you wish.

How to delete stubborn files/folders that cannot be deleted due to “File in Use” error

If the above methods don’t work for you and you are still unable to make changes or delete files/folders, the problem may lie elsewhere. Here are some potential fixes that you can try to resolve this issue.

1. End application from Task Manager

The first (and probably the simplest) thing you can do is close the app that locked the file. Of course, you need to know which application is using the file in the first place (see Methods #1 and #2 above for the same). 

Open the Task Manager by pressing  Ctrl + Shift + Escsimultaneously and make sure you are on the ‘Processes’ tab. Find the program holding the file hostage, right-click it and select   End Task  . 

How to find and delete stubborn files and folders that cannot be deleted on Windows 11

Doing so will end all instances of the program. Try making changes to the file/directory now. In most cases this will do the trick and free up the file/folder.

2. Check the file’s Properties (uncheck Read-only)

Sometimes the problem lies in the file itself. Maybe the file you’re trying to make changes to is a ‘read-only’ file. That means that other than opening it in an app, there’s not much you can do. To check this, right click on the file and select  Properties  .

How to find and delete stubborn files and folders that cannot be deleted on Windows 11

In the ‘General’ tab, find ‘Properties’ at the bottom. If there is a check mark placed next to Read Only    , it’s possible that this is what could be causing the problem. 

How to find and delete stubborn files and folders that cannot be deleted on Windows 11

To fix this, uncheck the ‘Read-only’ option and click   OK  .

How to find and delete stubborn files and folders that cannot be deleted on Windows 11

Note: If the option is grayed out or you cannot uncheck it, you may not be the owner of this file and may not be allowed to do so.

3. Force delete files with Command Prompt

If you are trying to delete a file and are hindered by an unknown application, you can try to force delete the file from the Command Prompt. Here’s how to do it:

Navigate to the folder containing the file. Right click on the folder and select  Copy as path  . Our file is in the ‘Videos’ folder so we right click on the ‘Videos’ folder and then select ‘Copy as path’.

How to find and delete stubborn files and folders that cannot be deleted on Windows 11

Then, open Command Prompt by pressing Start, typing  cmd  and clicking  Run as administrator  .

How to find and delete stubborn files and folders that cannot be deleted on Windows 11

Now go to the folder of the file, type  cdand then press  Ctrl + Vto paste the path we copied earlier.

How to find and delete stubborn files and folders that cannot be deleted on Windows 11

Then press Enter. This will change the directory to the directory containing the file.

How to find and delete stubborn files and folders that cannot be deleted on Windows 11

Now, before we continue, we have to temporarily end the Explorer process. To do this, press  Ctrl + Shift + Escsimultaneously. Find   Windows Explorer   from the list of processes, right click on it and select   End Task  .

How to find and delete stubborn files and folders that cannot be deleted on Windows 11

Return to the Command Prompt (use Alt + Tab to find it). Now, enter the following command to force delete the file:

del “filename”

Be sure to replace “filename” with the full name of the file, including its extension. It will look something like this:

How to find and delete stubborn files and folders that cannot be deleted on Windows 11

Then press Enter. Now, it’s time to bring Windows Explorer back. To do this, open Task Manager (as shown before), click   FIle > Run new task  .

How to find and delete stubborn files and folders that cannot be deleted on Windows 11

Type “explorer.exe” and click  OK  .

How to find and delete stubborn files and folders that cannot be deleted on Windows 11

You should now be able to make changes to your files and folders. 

4. Restart the computer

Sometimes, something as simple as restarting the computer can do the trick. Rebooting gives the system a soft reset, allowing apps to load from scratch. Maybe you can edit or delete your files after a simple reboot. While not guaranteed to work in all cases, you’d be surprised at what a simple reboot can do. 

5. Boot into Safe Mode and delete the file

If you still cannot delete the file or make changes to it, you can try to boot Windows into Safe Mode and make changes from there. If you’re not sure how to boot into Safe Mode, follow the steps below:

Press Start, click the Power button, then, while pressing the “Shift” key, click  Restart  .

How to find and delete stubborn files and folders that cannot be deleted on Windows 11

Now, while the computer is restarting, you will be taken to the Advanced Restart options. Select   Troubleshooting  .

How to find and delete stubborn files and folders that cannot be deleted on Windows 11

Click   Advanced Options  .

How to find and delete stubborn files and folders that cannot be deleted on Windows 11

Click   Startup Settings  .

How to find and delete stubborn files and folders that cannot be deleted on Windows 11

Click   Restart  .

How to find and delete stubborn files and folders that cannot be deleted on Windows 11

Now press the number corresponding to   Enable Safe Mode with Networking  .

How to find and delete stubborn files and folders that cannot be deleted on Windows 11

After booting in Safe Mode, you can try to make changes to the file. In all likelihood, you won’t get a ‘File in Use’ error here and can edit or delete it as you wish.

The ‘File in Use’ error is an obvious annoyance, especially considering the fact that even on Windows 11, we still don’t have an easy way to find which application is locking files and folders that are locked. mention. We hope with using this guide you can at least solve the problem and free your files/folders.

Leave a Reply

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

Back to top button