I\'ve seen several of answers about using Handle or Process Monitor, but I would like to be able to find out in my own code (C#) which process is locking a file.
I ha
One of the good things about handle.exe is that you can run it as a subprocess and parse the output.
handle.exe
We do this in our deployment script - works like a charm.