Find out which process is locking a file or folder in Windows
--
Music by Eric Matyas
https://www.soundimage.org
Track title: Puzzle Game Looping
--
Chapters
00:00 Question
00:37 Accepted answer (Score 140)
01:09 Answer 2 (Score 1417)
02:11 Answer 3 (Score 456)
02:58 Answer 4 (Score 266)
04:06 Thank you
--
Full question
https://superuser.com/questions/117902/f...
Accepted answer links:
[How to find out which process is locking a file or folder in Windows]: https://gallery.technet.microsoft.com/Ho...
[archive]: https://web.archive.org/web/201904301251...
Answer 3 links:
[Microsoft/SysInternals Process Explorer]: http://technet.microsoft.com/en-us/sysin...
[WhoLockMe]: http://www.dr-hoiby.com/WhoLockMe/
Answer 4 links:
[Process Explorer]: http://technet.microsoft.com/en-us/sysin...
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#windows #filesystems #process #communityfaqproposed
#avk47
ANSWER 1
Score 1618
You can use the Resource Monitor for this which comes built-in with Windows 7, 8, 10 and 11!
- Open Resource Monitor, which can be found
- By searching for Resource Monitor or resmon.exe in the start menu, or
- As a button on the Performance tab in your Task Manager
- Go to the CPU tab
- In the Processes section, select all processes by clicking the checkbox next to "Image" in the headers.
- Use the search field in the Associated Handles section
- See blue arrow in screen shot below
When you've found the handle, you can identify the process by looking at the Image and/or PID column.
You can then try to close the application as you normally would, or, if that's not possible, just right-click the handle and kill the process directly from there. Easy peasy!
ANSWER 2
Score 469
A couple of options:
Microsoft/SysInternals Process Explorer - Go to Find > Find Handle or DLL. In the "Handle or DLL substring:" text box, type the path to the file (e.g. "C:\path\to\file.txt") and click "Search". All processes which have an open handle to that file should be listed.
WhoLockMe - Explorer extension which adds a right-click menu option
N.B. WhoLockMe appears to not work with Win 10 (at least I have been unable to register it with either of the 32- or 64-bit versions of regsvr32.exe).
ANSWER 3
Score 275
Have a look at Process Explorer (procexp.exe
).
From its introduction:
Ever wondered which program has a particular file or directory open? Now you can find out.
To find out what process is using a specific file follow these steps:
Go to Find, Find Handle or DLL.. or simply press Ctrl+F.
Enter the name of the file and press Search.
Process Explorer will list all processes that have a handle to the file open. Click on an entry to focus the process in the main window.
Optionally, you can then even close the handle manually through the lower pane (Ctrl+L):
ANSWER 4
Score 67
LockHunter can unlock any handlers that may have locked your files or folders. Unlike similar freewares, it supports both 32 and 64-bit Windows.
It is a free tool to delete files blocked by something you do not know. LockHunter is useful for fighting against malware, and other programs that are blocking files without a reason. Unlike other similar tools it deletes files into the recycle bin so you may restore them if deleted by mistake.
- Shows processes locking a file or folder
- Allows to unlock, delete, copy or rename a locked file
- Allows to kill locking process
- Allows to remove locking processes from hard drive
- Integrates in to Explorer menu
- It deletes files into the recycle bin, so you may restore them if deleted by mistake
- Supports both 32 and 64bit Windows