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.
Once downloaded, right click on the zip file and click Extract All .
Choose a location to extract, then click Extract .
Then run the executable for Process Explorer.
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.
Drag and drop this icon onto the “File/Folder In Use” error message.
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).
To unlock it, you will have to kill the process marked in purple. To do this, click on the program to select it.
Then press the delete key. When asked to confirm, click OK .
Now you can delete, rename or edit the file as you like.
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.
In Resource Monitor, click the CPU tab to switch to that tab.
Then click on the ‘Search Engine’ field next to Linking Tools .
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.
If you want to end this process right here, right click on it and select End Process .
Click End Process when asked to confirm.
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 .
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 .
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.
To fix this, uncheck the ‘Read-only’ option and click OK .
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’.
Then, open Command Prompt by pressing Start, typing cmd and clicking Run as administrator .
Now go to the folder of the file, type cdand then press Ctrl + Vto paste the path we copied earlier.
Then press Enter. This will change the directory to the directory containing the file.
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 .
Return to the Command Prompt (use Alt + Tab to find it). Now, enter the following command to force delete the file:
Be sure to replace “filename” with the full name of the file, including its extension. It will look something like this:
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 .
Type “explorer.exe” and click OK .
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 .
Now, while the computer is restarting, you will be taken to the Advanced Restart options. Select Troubleshooting .
Click Advanced Options .
Click Startup Settings .
Click Restart .
Now press the number corresponding to Enable Safe Mode with Networking .
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.