"The file is in use" is only half an answer - Windows rarely says who is using it.
The other half is always available, because Windows keeps a record of every open file for every running process.
Here are five ways to read that record, from tools you already have to a free one-click unlocker.
What "locked" really means
Each open file is tracked by a handle, a ticket that belongs to one process. A process can open a file in shared mode or ask for exclusive access.
With exclusive access, deleting, renaming and sometimes even reading fails for everyone else until that handle is closed. Finding the lock therefore means finding the process that owns the handle.
1. Resource Monitor (built in)
Resource Monitor ships with every edition of Windows 11 and 10 and needs no download.
- Press Win+R, type
resmonand press Enter. - Switch to the CPU tab.
- Expand Associated Handles and type part of the file or folder name in its search box.
The list shows the image name and the PID of every process with a matching handle. Right-click an entry to end that process.
The search is slow on busy systems and works on one name at a time.
2. File Unlocker (free, portable)
ScanWith File Unlocker asks the Windows Restart Manager the same question and answers it in about a second.
Drop one or many files or folders on the window. Each becomes a row, and the programs holding it are listed underneath with their name, PID, type and service name.
From there one click closes the programs and deletes, moves or renames the file. It is a single portable executable for 64-bit Windows 11 and 10.
3. Sysinternals Handle (command line)
Handle is a small command-line utility from Microsoft. Run it from a Command Prompt opened as administrator.
handle64.exe report-final.docx prints every process that has a handle whose name contains that text. It suits scripts and remote sessions where no window is available.
4. Process Explorer
Process Explorer, also from Microsoft Sysinternals, has the same search with a graphical interface. Open the Find menu, choose Find Handle or DLL and type the file name.
Click a result to jump to the owning process in the tree. This is the tool to pick when you also want to inspect that process more closely.
5. PowerToys File Locksmith
If you already use Microsoft PowerToys, its File Locksmith module adds an entry to the right-click menu of files and folders.
It lists the processes using the selection and can end them. It needs the PowerToys suite to be installed and does not delete or move the file for you.
Bonus: files opened over the network
On a PC or server that shares folders, run openfiles /query in an administrator Command Prompt. It lists files that other computers have open through a share, with the user name.
Reading the result
- An application you know (Word, a video player, an editor): save your work and close it normally.
- Windows Explorer: usually the preview pane or a thumbnail. Press Alt+P or restart Explorer from Task Manager.
- A service (search indexer, antivirus, backup, cloud sync): it normally lets go within a minute. Pause the sync or wait, then try again.
- System, PID 4: Windows itself holds the file. Do not force it - schedule the deletion for the next restart instead.
- A name you do not recognise: check the program first with the Online Virus Scanner before you trust it.
Once you know the owner, the step-by-step fixes are in how to delete a file that is open in another program.
Frequently asked questions
Can I see locked files without administrator rights?
Only for programs you started yourself. Handles of services and other users stay hidden until the tool runs as administrator.
Why does no tool show any process?
Then the file is probably not locked. Look for a permission problem ("Access is denied"), a read-only drive or a path longer than Windows accepts.
Does this work for folders?
Yes. A folder is locked when a program uses it as its working folder or has a file inside it open. All five methods accept a folder name.