I need to check if files on a network share are in use or otherwise locked by some process. If the file being checked is in use, I would also like to get the name of the user who has the file open. I've found code that tells me if the files I need are in use but I still need to determine who has them open.
The examples I've found follow the basic syntax below to test if the files are in use:
Does anyone have an example they can share that will give me the user name as well?
The examples I've found follow the basic syntax below to test if the files are in use:
Code:
Open file_in_question For Binary Access Read Write Lock Read Write As #filenum
or
Open file_in_question For Input Lock Read As #filenum