File in use

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

I would like to be able to check to see if files are in use. When I say
files, I don't just want to check for .txt files. I want to check for any
type of file like .exe and .dll files.

Thanks
 
I believe that attempting to open the file with read/lock access should do
the trick. However if the file is a DLL or EXE, make sure that it is not
read only before trying to open it. Also protect your code with Try/Catch
b/c you will raise an exception if you can't open the file.

HTH
(e-mail address removed)

Try our latest time saving tool, Visual Class Organizer, free for 30 days.

http://www.knowdotnet.com/articles/VisualOrganizerProductHome.html
 
Back
Top