Trying to track open files\locks on a server due to application issues. I can use Computer Management\Shared Folders\Open Files and see this data. The fields I get are:

Open File, Accessed By, Type, # Locks, Open Mode

Using this tool, I can export the list to a CSV. In trying to come up with a batch file to do it automatically, I found OpenFiles.exe. The script works fine, the issue is I only get these fields:

ID, Accessed By, Type, Open File (Path\executable)

There is no option with OpenFiles.exe to get the #Locks data. Which is frustrating, considering the data I want is right there in the Windows tool! Has anyone previously tackled this issue?

1

There are 1 best solutions below

1
On

Try out the Handle utility from System Internals at https://learn.microsoft.com/en-us/sysinternals/downloads/handle

You should be able to get all of the information you are looking for with this command:

handle.exe -a -u -s