Check Mapped Drive is Connected

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Ben

    #1

    Check Mapped Drive is Connected

    Hi

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

    How can i do this?

    Many thanks
    B


  • Luis Gustavo

    #2
    Re: Check Mapped Drive is Connected

    Dim a As New IO.DriveInfo("z ")
    if a.isReady then
    msgbox("is connected ")
    else
    ....


    "Ben" <Ben@Newsgroups .microsoft.com> wrote in message
    news:O6Rjt%23AV GHA.5580@TK2MSF TNGP11.phx.gbl. ..[color=blue]
    > Hi
    >
    > I need to check that a mapped drive is connected before continuing some
    > code.
    >
    > How can i do this?
    >
    > Many thanks
    > B
    >
    >[/color]


    Comment

    • Ben

      #3
      Re: Check Mapped Drive is Connected

      Hi Luis

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

      B

      "Luis Gustavo" <luis.gustavo@m edtech-angola.com> wrote in message
      news:O1ABsJBVGH A.4608@tk2msftn gp13.phx.gbl...[color=blue]
      > Dim a As New IO.DriveInfo("z ")
      > if a.isReady then
      > msgbox("is connected ")
      > else
      > ....
      >
      >
      > "Ben" <Ben@Newsgroups .microsoft.com> wrote in message
      > news:O6Rjt%23AV GHA.5580@TK2MSF TNGP11.phx.gbl. ..[color=green]
      > > Hi
      > >
      > > I need to check that a mapped drive is connected before continuing some
      > > code.
      > >
      > > How can i do this?
      > >
      > > Many thanks
      > > B
      > >
      > >[/color]
      >
      >[/color]


      Comment

      • Luis Gustavo

        #4
        Re: Check Mapped Drive is Connected

        This soluction is for framework 2

        In FrameWork 1.1

        Dim a As System.IO.Direc tory

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


        "Ben" <Ben@Newsgroups .microsoft.com> wrote in message
        news:%23vRArUBV GHA.4900@TK2MSF TNGP12.phx.gbl. ..[color=blue]
        > Hi Luis
        >
        > Thanks for your post, but i receive the error DriveInfo not declared.
        >
        > B
        >
        > "Luis Gustavo" <luis.gustavo@m edtech-angola.com> wrote in message
        > news:O1ABsJBVGH A.4608@tk2msftn gp13.phx.gbl...[color=green]
        >> Dim a As New IO.DriveInfo("z ")
        >> if a.isReady then
        >> msgbox("is connected ")
        >> else
        >> ....
        >>
        >>
        >> "Ben" <Ben@Newsgroups .microsoft.com> wrote in message
        >> news:O6Rjt%23AV GHA.5580@TK2MSF TNGP11.phx.gbl. ..[color=darkred]
        >> > Hi
        >> >
        >> > I need to check that a mapped drive is connected before continuing some
        >> > code.
        >> >
        >> > How can i do this?
        >> >
        >> > Many thanks
        >> > B
        >> >
        >> >[/color]
        >>
        >>[/color]
        >
        >[/color]


        Comment

        • parez

          #5
          Re: Check Mapped Drive is Connected

          try this


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

          End If



          Ben wrote:[color=blue]
          > Hi Luis
          >
          > Thanks for your post, but i receive the error DriveInfo not declared.
          >
          > B
          >
          > "Luis Gustavo" <luis.gustavo@m edtech-angola.com> wrote in message
          > news:O1ABsJBVGH A.4608@tk2msftn gp13.phx.gbl...[color=green]
          > > Dim a As New IO.DriveInfo("z ")
          > > if a.isReady then
          > > msgbox("is connected ")
          > > else
          > > ....
          > >
          > >
          > > "Ben" <Ben@Newsgroups .microsoft.com> wrote in message
          > > news:O6Rjt%23AV GHA.5580@TK2MSF TNGP11.phx.gbl. ..[color=darkred]
          > > > Hi
          > > >
          > > > I need to check that a mapped drive is connected before continuing some
          > > > code.
          > > >
          > > > How can i do this?
          > > >
          > > > Many thanks
          > > > B
          > > >
          > > >[/color]
          > >
          > >[/color][/color]

          Comment

          • parez

            #6
            Re: Check Mapped Drive is Connected

            try this


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

            End If



            Ben wrote:[color=blue]
            > Hi Luis
            >
            > Thanks for your post, but i receive the error DriveInfo not declared.
            >
            > B
            >
            > "Luis Gustavo" <luis.gustavo@m edtech-angola.com> wrote in message
            > news:O1ABsJBVGH A.4608@tk2msftn gp13.phx.gbl...[color=green]
            > > Dim a As New IO.DriveInfo("z ")
            > > if a.isReady then
            > > msgbox("is connected ")
            > > else
            > > ....
            > >
            > >
            > > "Ben" <Ben@Newsgroups .microsoft.com> wrote in message
            > > news:O6Rjt%23AV GHA.5580@TK2MSF TNGP11.phx.gbl. ..[color=darkred]
            > > > Hi
            > > >
            > > > I need to check that a mapped drive is connected before continuing some
            > > > code.
            > > >
            > > > How can i do this?
            > > >
            > > > Many thanks
            > > > B
            > > >
            > > >[/color]
            > >
            > >[/color][/color]

            Comment

            • Ben

              #7
              Re: Check Mapped Drive is Connected

              Thanks

              Thats perfect.

              B
              "parez" <psawant@gmail. com> wrote in message
              news:1143736545 .091197.39320@i 40g2000cwc.goog legroups.com...[color=blue]
              > try this
              >
              >
              > Dim di As New System.IO.Direc toryInfo("C:")
              > If di.Exists() Then
              >
              > End If
              >
              >
              >
              > Ben wrote:[color=green]
              > > Hi Luis
              > >
              > > Thanks for your post, but i receive the error DriveInfo not declared.
              > >
              > > B
              > >
              > > "Luis Gustavo" <luis.gustavo@m edtech-angola.com> wrote in message
              > > news:O1ABsJBVGH A.4608@tk2msftn gp13.phx.gbl...[color=darkred]
              > > > Dim a As New IO.DriveInfo("z ")
              > > > if a.isReady then
              > > > msgbox("is connected ")
              > > > else
              > > > ....
              > > >
              > > >
              > > > "Ben" <Ben@Newsgroups .microsoft.com> wrote in message
              > > > news:O6Rjt%23AV GHA.5580@TK2MSF TNGP11.phx.gbl. ..
              > > > > Hi
              > > > >
              > > > > I need to check that a mapped drive is connected before continuing[/color][/color][/color]
              some[color=blue][color=green][color=darkred]
              > > > > code.
              > > > >
              > > > > How can i do this?
              > > > >
              > > > > Many thanks
              > > > > B
              > > > >
              > > > >
              > > >
              > > >[/color][/color]
              >[/color]


              Comment

              Working...