Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > Pro VB 6
| Search | Today's Posts | Mark Forums Read
Pro VB 6 For advanced Visual Basic coders working in version 6 (not .NET). Beginning-level questions will be redirected to other forums, including Beginning VB 6.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 1st, 2005, 04:53 PM
Friend of Wrox
 
Join Date: Nov 2004
Location: Port Orchard, WA, USA.
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
Default How to find if drive is a mapped drive

If a user browses to a file in my app, and I get back something like "F:\Docs\SpringQtr\The.doc", how can I find whether the F: drive is a hard disk from a machine that has many, a CD, or a mapped drive?

And—more importantly—how can I find what the UNC is for that particular mapped drive?
 
Old June 2nd, 2005, 04:07 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: , , United Kingdom.
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
Default

use the Drive object (from FileSystemObject.GetDrive)

property DriveType tells what sort of drive it is (see the DriveTypeConst in the VB Object Browser)
and ShareName property gives UNC path

rgds
Phil




Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't detect a mapped drive in ASP Reese_Kirsten ASP.NET 1.0 and 1.1 Basics 2 December 1st, 2006 02:46 AM
mapped drive khansa PHP How-To 0 February 23rd, 2006 07:46 AM
mapped drive khansa PHP How-To 0 February 23rd, 2006 07:43 AM
Mapped drive khansa MySQL 1 February 23rd, 2006 05:38 AM
How to find if drive is a mapped drive BrianWren Access VBA 0 June 1st, 2005 04:55 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.