Home All Groups Group Topic Archive Search About

Check Mapped Drive is Connected

Author
30 Mar 2006 3:35 PM
Ben
Hi

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

How can i do this?

Many thanks
B

Author
30 Mar 2006 5:49 PM
Luis Gustavo
Dim a As New IO.DriveInfo("z")
        if a.isReady then
             msgbox("is connected ")
        else
            ....


Show quoteHide quote
"Ben" <B**@Newsgroups.microsoft.com> wrote in message
news:O6Rjt%23AVGHA.5580@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
>
>
Author
30 Mar 2006 4:15 PM
Ben
Hi Luis

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

B

Show quoteHide quote
"Luis Gustavo" <luis.gust***@medtech-angola.com> wrote in message
news:O1ABsJBVGHA.4608@tk2msftngp13.phx.gbl...
>         Dim a As New IO.DriveInfo("z")
>         if a.isReady then
>              msgbox("is connected ")
>         else
>             ....
>
>
> "Ben" <B**@Newsgroups.microsoft.com> wrote in message
> news:O6Rjt%23AVGHA.5580@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
> >
> >
>
>
Author
30 Mar 2006 4:35 PM
parez
try this


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

        End If



Ben wrote:
Show quoteHide quote
> Hi Luis
>
> Thanks for your post, but i receive the error DriveInfo not declared.
>
> B
>
> "Luis Gustavo" <luis.gust***@medtech-angola.com> wrote in message
> news:O1ABsJBVGHA.4608@tk2msftngp13.phx.gbl...
> >         Dim a As New IO.DriveInfo("z")
> >         if a.isReady then
> >              msgbox("is connected ")
> >         else
> >             ....
> >
> >
> > "Ben" <B**@Newsgroups.microsoft.com> wrote in message
> > news:O6Rjt%23AVGHA.5580@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
> > >
> > >
> >
> >
Author
30 Mar 2006 4:35 PM
parez
try this


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

        End If



Ben wrote:
Show quoteHide quote
> Hi Luis
>
> Thanks for your post, but i receive the error DriveInfo not declared.
>
> B
>
> "Luis Gustavo" <luis.gust***@medtech-angola.com> wrote in message
> news:O1ABsJBVGHA.4608@tk2msftngp13.phx.gbl...
> >         Dim a As New IO.DriveInfo("z")
> >         if a.isReady then
> >              msgbox("is connected ")
> >         else
> >             ....
> >
> >
> > "Ben" <B**@Newsgroups.microsoft.com> wrote in message
> > news:O6Rjt%23AVGHA.5580@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
> > >
> > >
> >
> >
Author
30 Mar 2006 4:40 PM
Ben
Thanks

Thats perfect.

B
Show quoteHide quote
"parez" <psaw***@gmail.com> wrote in message
news:1143736545.091197.39320@i40g2000cwc.googlegroups.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" <luis.gust***@medtech-angola.com> wrote in message
> > news:O1ABsJBVGHA.4608@tk2msftngp13.phx.gbl...
> > >         Dim a As New IO.DriveInfo("z")
> > >         if a.isReady then
> > >              msgbox("is connected ")
> > >         else
> > >             ....
> > >
> > >
> > > "Ben" <B**@Newsgroups.microsoft.com> wrote in message
> > > news:O6Rjt%23AVGHA.5580@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
> > > >
> > > >
> > >
> > >
>
Author
30 Mar 2006 6:24 PM
Luis Gustavo
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
             ....


Show quoteHide quote
"Ben" <B**@Newsgroups.microsoft.com> wrote in message
news:%23vRArUBVGHA.4900@TK2MSFTNGP12.phx.gbl...
> Hi Luis
>
> Thanks for your post, but i receive the error DriveInfo not declared.
>
> B
>
> "Luis Gustavo" <luis.gust***@medtech-angola.com> wrote in message
> news:O1ABsJBVGHA.4608@tk2msftngp13.phx.gbl...
>>         Dim a As New IO.DriveInfo("z")
>>         if a.isReady then
>>              msgbox("is connected ")
>>         else
>>             ....
>>
>>
>> "Ben" <B**@Newsgroups.microsoft.com> wrote in message
>> news:O6Rjt%23AVGHA.5580@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
>> >
>> >
>>
>>
>
>