When you try to open, delete, move, rename or edit a file, the action fails because a process is using the file and thus Windows returns an error that reads “”File In Use – the action can’t be completed because the file is open in another program“.
In some cases, Windows may prompt the error and tell you the which program is using the file, but in other cases, it will just show “open in another program” which you will have to figure it out yourself.
This guide will show you several methods on how to find out which process is currently using a specific file in Windows 11, and how to unlock a file that is locked by a process.
Find which process is using a file in Windows 11
In Windows 11, you can quickly check which process is using a file without installing any third party software. You can do so using the Resource Monitor tool in Windows 11, or by using a command line in Windows PowerShell or Command Prompt.
Check which process is locking a file using Resource Monitor
Resource Monitor is a Windows built-in tool that allows you to monitor resource consumption such as CPU, memory, disk and network usage of active processes in Windows 11. There is also a section called Associated Handles which you can search for the process that is using and locking a file by entering the name of the locked file.
- First, open Resource Monitor by typing resmon in the Start and hit Enter.
- In the Resource Monitor window, go to the CPU tab.
- Next, click on Associated Handles to expand the section.
- In the search box next to Associated Handles, type the name of the file that is locked by a program, then hit Enter to search.
- The search result will return any process it finds to be locking the file.
In the example above, I have a file named sample.pdf which was locked by Adobe Acrobat Reader. Thus, when I search for sample.pdf in the Associated Handles, it returned AcroRd32.exe as the search result, which is the process that was locking the sample.pdf file.
Once you know which process is locking the file, you can then terminate the process by either closing the program manually or by killing the task via Task Manager so that you can perform action on that particular file.
Tip: Alternatively, you can also open Resource Monitor through Task Manager (Ctrl + Shift + Esc) > Performance > Open Resource Monitor.
Windows PowerShell / Command Prompt
To identify which process is using a file via Windows Terminal (PowerShell) or Command Prompt in Windows 11, we need to use a command-line utility called Handle which allows users to tell which process is locking a specific file.
However, Handle is not included in Windows by default. You will need to first download it from https://docs.microsoft.com/en-us/sysinternals/downloads/handle.
The file you will be downloading is a zip file that contains the handle.exe. Once downloaded, extract the zip file to anywhere you want.
To correctly use handle.exe as a command line to find which process is using a specific file, in the folder where you’ve unzipped the handle.exe, right-click in the folder and select “Open in Windows Terminal” to open Windows PowerShell in this directory.
In the PowerShell window, enter the following command.
.\handle.exe -a -u "path to the locked file"
For example, to find the process that is locking my sample.pdf, I need to enter the following command.
.\handle.exe -a -u "C:\Users\alvin\Desktop\sample.pdf"
If you run Command Prompt instead, use the following command. Make sure the command prompt is opened in the folder where you’ve extracted the handle.exe. Otherwise you will have to enter the full path to the handle.exe instead of just handle.exe.
handle.exe -a -u "path to the locked file"
How to unlock a file locked by a process using Unlocker
If you don’t mind downloading and installing a third party software, we recommend Unlocker by IObit. Unlocker is a simple utility tool for Windows that is able to identify the process that is locking a file and unlock the file directly should you choose to.
To learn how to unlock a locked file in Windows 11 using Unlocker, read: How to Force Delete a File in Use by Another Program on Windows 11/10.