Question

Is there a way to get the program that is locking a file, in vb 2005?

For instance, when I try to open a file that is already opened by another program, can I get the name of the process/program that has locked this file?

Was it helpful?

Solution

System Internals has a tool called Handle that you can use. It tells you which program has what file and/or directory open. It is a console application. You can pipe its output to a text file and then simply open that text file and search for the file you're looking for. Then you can see which process has it open.

c:\handle > output.txt
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top