Link to home
Start Free TrialLog in
Avatar of charlieb01
charlieb01

asked on

VB.Net Determine if a mapped network drive exists

I have a VB.NET application that collects information from a data acquisition system and periodically stores the information in a comma delimited file.
On my "Pre-Test" user interface form I have a label that shows the path where the CSV file will be stored and a button that allows the user to browse and select a different folder or create a new one.  Once the user clicks the OK button to start the test, the full path of the CSV storage folder is saved to a variable in the My.Settings.
The program will be installed on a notebook pc and there will be multiple users. One user could create a mapped network drive so he can store the test data to a server and retrieve it in his office.  He could then disconnect the mapped drive when he is finished.  So, when the next user wants to use this same notebook, the storage folder label will automatically load the mapped drive path from the My.Settings.
If it was the original user and he had not disconnected the mapped drive then all would be fine.  However, if the next user gets to notebook and the previous mapped drive has been disconnected, he will get an error if he doesn't pay attention to the storage path.

What I am looking for is a way to determine if the mapped drive letter still exists and prompt the user with a message to select a different path.
Any ideas about to capture this?

Thanks,
Charlie
ASKER CERTIFIED SOLUTION
Avatar of JesterToo
JesterToo
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of Ark
Ark
Flag of Russian Federation image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial