On my network multiple people will be accessing the same file daily. I wanted to know if there is a way with code to detect if the file is in use.
Printable View
On my network multiple people will be accessing the same file daily. I wanted to know if there is a way with code to detect if the file is in use.
Access for reading or writing? If for reading it doesn't matter. If for writing, open the file for writing and trap the error. How you do that depends on the language the code is written in.
try renaming the file.
if you can, it's not busy, so rename it back.
in a winnt environ, you can also use the openfiles command at the command line.