Check Mapped Drive is Connected

  • Thread starter Thread starter Ben
  • Start date Start date
B

Ben

Hi

I need to check that a mapped drive is connected before continuing some
code.

How can i do this?

Many thanks
B
 
Hi Luis

Thanks for your post, but i receive the error DriveInfo not declared.

B
 
try this


Dim di As New System.IO.DirectoryInfo("C:")
If di.Exists() Then

End If
 
try this


Dim di As New System.IO.DirectoryInfo("C:")
If di.Exists() Then

End If
 
Dim a As New IO.DriveInfo("z")
if a.isReady then
msgbox("is connected ")
else
....
 
This soluction is for framework 2

In FrameWork 1.1

Dim a As System.IO.Directory

if a.Exists("z:\") then
msgbox("is connected ")
else
....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top