By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,534 Members | 950 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,534 IT Pros & Developers. It's quick & easy.

Check Mapped Drive is Connected

P: n/a
Ben
Hi

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

How can i do this?

Many thanks
B
Mar 30 '06 #1
Share this Question
Share on Google+
6 Replies


P: n/a
Dim a As New IO.DriveInfo("z")
if a.isReady then
msgbox("is connected ")
else
....
"Ben" <Be*@Newsgroups.microsoft.com> wrote in message
news:O6****************@TK2MSFTNGP11.phx.gbl...
Hi

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

How can i do this?

Many thanks
B

Mar 30 '06 #2

P: n/a
Ben
Hi Luis

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

B

"Luis Gustavo" <lu**********@medtech-angola.com> wrote in message
news:O1**************@tk2msftngp13.phx.gbl...
Dim a As New IO.DriveInfo("z")
if a.isReady then
msgbox("is connected ")
else
....
"Ben" <Be*@Newsgroups.microsoft.com> wrote in message
news:O6****************@TK2MSFTNGP11.phx.gbl...
Hi

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

How can i do this?

Many thanks
B


Mar 30 '06 #3

P: n/a
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
....
"Ben" <Be*@Newsgroups.microsoft.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Hi Luis

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

B

"Luis Gustavo" <lu**********@medtech-angola.com> wrote in message
news:O1**************@tk2msftngp13.phx.gbl...
Dim a As New IO.DriveInfo("z")
if a.isReady then
msgbox("is connected ")
else
....
"Ben" <Be*@Newsgroups.microsoft.com> wrote in message
news:O6****************@TK2MSFTNGP11.phx.gbl...
> Hi
>
> I need to check that a mapped drive is connected before continuing some
> code.
>
> How can i do this?
>
> Many thanks
> B
>
>



Mar 30 '06 #4

P: n/a
try this
Dim di As New System.IO.DirectoryInfo("C:")
If di.Exists() Then

End If

Ben wrote:
Hi Luis

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

B

"Luis Gustavo" <lu**********@medtech-angola.com> wrote in message
news:O1**************@tk2msftngp13.phx.gbl...
Dim a As New IO.DriveInfo("z")
if a.isReady then
msgbox("is connected ")
else
....
"Ben" <Be*@Newsgroups.microsoft.com> wrote in message
news:O6****************@TK2MSFTNGP11.phx.gbl...
Hi

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

How can i do this?

Many thanks
B



Mar 30 '06 #5

P: n/a
try this
Dim di As New System.IO.DirectoryInfo("C:")
If di.Exists() Then

End If

Ben wrote:
Hi Luis

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

B

"Luis Gustavo" <lu**********@medtech-angola.com> wrote in message
news:O1**************@tk2msftngp13.phx.gbl...
Dim a As New IO.DriveInfo("z")
if a.isReady then
msgbox("is connected ")
else
....
"Ben" <Be*@Newsgroups.microsoft.com> wrote in message
news:O6****************@TK2MSFTNGP11.phx.gbl...
Hi

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

How can i do this?

Many thanks
B



Mar 30 '06 #6

P: n/a
Ben
Thanks

Thats perfect.

B
"parez" <ps*****@gmail.com> wrote in message
news:11*********************@i40g2000cwc.googlegro ups.com...
try this
Dim di As New System.IO.DirectoryInfo("C:")
If di.Exists() Then

End If

Ben wrote:
Hi Luis

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

B

"Luis Gustavo" <lu**********@medtech-angola.com> wrote in message
news:O1**************@tk2msftngp13.phx.gbl...
Dim a As New IO.DriveInfo("z")
if a.isReady then
msgbox("is connected ")
else
....
"Ben" <Be*@Newsgroups.microsoft.com> wrote in message
news:O6****************@TK2MSFTNGP11.phx.gbl...
> Hi
>
> I need to check that a mapped drive is connected before continuing some > code.
>
> How can i do this?
>
> Many thanks
> B
>
>

Mar 30 '06 #7

This discussion thread is closed

Replies have been disabled for this discussion.