Is Folder Local

  • Thread starter Thread starter Fred W.
  • Start date Start date
F

Fred W.

Is there a way to tell if path is on a local drive instead of a mapped drive
or network. Thanks

- Fred
 
Hi,

Are you in 2.0 ? if so there is a new class DriveInfo tht can give you this
info.

Don't quite remember how to get it in 1.1 (without using either w32 or WMI)
do a search in the archives.
 
In the windows api kernel32.dll there is a function GetDriveTypeA
it takes in a string containing the drive letter and returns an int which
means:
2 = Removable Drive
3 = Fixed Drive
4 = Remote / Network drive
5 = CDROM/DVD
6 = Ram Disk

HTH


Ciaran O'Donnell
 
| Is there a way to tell if path is on a local drive instead of a mapped
drive
| or network. Thanks
|
| - Fred
|
|

DriveInfo.DriveType.
But this requires a mapped drive which is something you should avoid in your
code whenever you can. Use UNC paths (\\server\path\file) to access network
shares.

Willy.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top