How to find the Drive Type 
Author Message
 How to find the Drive Type

I'm trying to re-code a vb6 app and for the life of me I can't figure out
how to determine the drive type with the new System.IO Namespace.  I'm
looking for the new and improved method to replace the VB6 (using the
FileSystemObject) example below.

Dim fso As New FileSystemObject
Dim d As drive
For Each d In fso.Drives
    If d.DriveType = 3 Then
        MsgBox "This is a network drive"
    End If
Next



Tue, 01 Feb 2005 13:25:17 GMT  
 How to find the Drive Type
Maybe there's another way...but i suppose the author isn't writing lies
inhere:
http://www.fawcette.com/vsm/2002_08/magazine/columns/gettingstarted/d...
pf.asp

hth...SoTTo


Quote:
> I'm trying to re-code a vb6 app and for the life of me I can't figure out
> how to determine the drive type with the new System.IO Namespace.  I'm
> looking for the new and improved method to replace the VB6 (using the
> FileSystemObject) example below.

> Dim fso As New FileSystemObject
> Dim d As drive
> For Each d In fso.Drives
>     If d.DriveType = 3 Then
>         MsgBox "This is a network drive"
>     End If
> Next



Tue, 01 Feb 2005 18:36:59 GMT  
 How to find the Drive Type
I suppose this will work not only in asp.net but also in vb.net
http://www.aspalliance.com/brettb/ASP.NET.DrivesCollection.aspx

hth, SoTTo


Quote:
> I'm trying to re-code a vb6 app and for the life of me I can't figure out
> how to determine the drive type with the new System.IO Namespace.  I'm
> looking for the new and improved method to replace the VB6 (using the
> FileSystemObject) example below.

> Dim fso As New FileSystemObject
> Dim d As drive
> For Each d In fso.Drives
>     If d.DriveType = 3 Then
>         MsgBox "This is a network drive"
>     End If
> Next



Tue, 01 Feb 2005 18:41:54 GMT  
 How to find the Drive Type
The link below uses the Scripting Runtime file (Scrrun.dll). I was hoping to
advoid that.


Quote:
> Maybe there's another way...but i suppose the author isn't writing lies
> inhere:

http://www.fawcette.com/vsm/2002_08/magazine/columns/gettingstarted/d...
Quote:
> pf.asp

> hth...SoTTo



> > I'm trying to re-code a vb6 app and for the life of me I can't figure
out
> > how to determine the drive type with the new System.IO Namespace.  I'm
> > looking for the new and improved method to replace the VB6 (using the
> > FileSystemObject) example below.

> > Dim fso As New FileSystemObject
> > Dim d As drive
> > For Each d In fso.Drives
> >     If d.DriveType = 3 Then
> >         MsgBox "This is a network drive"
> >     End If
> > Next



Wed, 02 Feb 2005 05:58:35 GMT  
 How to find the Drive Type
Yep this is the one. Good explanation on the page as well.
System.Management Namespace was the way to go.   Have my new class built.
Thanks a ton!


Quote:
> I suppose this will work not only in asp.net but also in vb.net
> http://www.aspalliance.com/brettb/ASP.NET.DrivesCollection.aspx

> hth, SoTTo



> > I'm trying to re-code a vb6 app and for the life of me I can't figure
out
> > how to determine the drive type with the new System.IO Namespace.  I'm
> > looking for the new and improved method to replace the VB6 (using the
> > FileSystemObject) example below.

> > Dim fso As New FileSystemObject
> > Dim d As drive
> > For Each d In fso.Drives
> >     If d.DriveType = 3 Then
> >         MsgBox "This is a network drive"
> >     End If
> > Next



Wed, 02 Feb 2005 06:00:09 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. How to find drive type

2. How to find drive type in VB4?

3. drives, finding type

4. drives, finding type using vb4

5. Drive Type

6. Getting Drive types

7. Determining Drive Types

8. Working with getting drive type

9. Types driving me wild, can u help?

10. Drive Types - Help

11. Programmatically detect drive type as CD-Rom

12. Returning Types of Drives

 

 
Powered by phpBB® Forum Software