473,405 Members | 2,300 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Check Mapped Drive is Connected

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
6 20656
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
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: giloosh99 | last post by:
Hello, Im grabbing tables via VB code using visual foxpro ODBC drives. The tables directory is in a mapped network drive. The code works fine and does the job, however if the computer is idle for...
5
by: Niloday | last post by:
Hi All, I am trying to access a mapped network drive from a service that I have created. The service needs to create/delete folders/files on a network drive. When I tried to connect to a...
5
by: Nirosh | last post by:
Hi All, Can any one suggest me a best way to do this .. I have a thrid party tool "EXE" that we need to use with our web service to manipulate some complex XML files, which reside in a...
5
by: Marc | last post by:
I am trying to run a web service that has pre-compiled dll's that reference dll's that are on a mapped drive. The web service can not load because it does not see that mapped drive and returns an...
0
by: Manu | last post by:
Hi, To enumerate the Mapped drive in Windows 2000 box, I am using the "Win32_NetworkConnection". I can see the instance of the Mapped drive in local system, when I try to do the same with...
4
dima69
by: dima69 | last post by:
I have an application with a backend database connected to front end via mapped drive. It is installed at my client's office. Occasionally they report a problem while opening an application first...
4
by: cj | last post by:
How would you suggest I test that my network drive is still up and running. Right now I'm going to write to a file at the root of the drive and then read it back in. If either the write or read...
5
by: mcfly1204 | last post by:
I have one user that has one mapped drive disappear periodically. The drives are connected by a batch file that runs when they login. Users have two drives that map, each going to a different...
5
by: =?Utf-8?B?SmVycnkgQw==?= | last post by:
I am trying to accesss a Mapped Drive from my asp.net code running on IIS 6.0. I am using a FileUpload control and fileUpload.SaveAs() to save the file to the server. I want to save the file to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.