Check Which Process is Holding a File Open

Here is how you can check what process is holding a certain file open in Windows

Everything that is stored on a computer is managed as a separate file. Modern operating systems come with their own file systems that allow them to store and access multiple files at any given time. They also have their own rules and configurations on how each file is managed.

Usually, a file system will let you access a given file from multiple softwares (or multiple instances of the same software) at the same time. However, to keep the file from getting corrupted or prevent multiple programs making different changes on the same file – causing a merging conflict, they also have a writing lock option.

This writing lock means that while a certain program has writing lock on that particular file, no other program can make any changes to the file. And when you try to edit the file, it might say that the file is open in another program.

Fortunately, there is a way to check which process is currently holding a certain file open in Windows. This is possible thanks to a handy little set of utilities called Windows Sysinternals.

Using Windows Sysinternals to check Open File Handles

  1. Download Handle from the Sysinternals Download section.
  2. Extract the Zip file in a folder.
  3. Run the handle.exe or handle64.exe depending on your Operating System type and it will list down all the files handles that are currently open on your PC.

However, given that there are a lot of files that are in use by your operating system at any given time, it will list down hundreds of currently open files along with their process IDs.

To further improve your results and to limit it to just the files you are concerned with, you can also search by using the path of the folder where your concerned file is placed. Here is how you can do that using command line arguments. First, you will have to open Command Prompt in the folder where the handle64.exe (use our guide over here) where is placed or give the complete path of the utility.

handle64.exe C:\Users\rehan.ahmed\Downloads

This will limit the search area to just the Downloads section of the user (rehan.ahmed in this case).