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 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!
Source: filesystems – Find out which process is locking a file or folder in Windows – Super User