Features
      Ask DevGuru
      ASP Resources
      Find the Bug
      Knowledge Base
      Links
      Tips of the Week
      Tutorials
  Products
      dgCalendar
      dgCharge New!
      dgChart New!
      dgFileUpload
      dgReport New!
      dgSort
      dgTree
  Site
      Authoring
      Coming Soon
      DevGuru Resume
      Link to Us
      Merchandise
      Sponsorships
      Testimonials
      What's New
  Technologies
      ADO 2.6
      ASP
      CSS2
      HTML
      JavaScript
      Jet SQL
      Transact-SQL Syntax
      VBScript
      WML
      WMLScript
      WSH
      XML DOM

              











Property:  Drive.DriveType

Implemented in version 3.0
 
object.DriveType

The DriveType property returns an integer whose value corresponds to one of the DriveType Constants listed below. Note that only an integer is returned; to use the names below they must be defined in your code.

0 = Unknown
1 = Removable
2 = Fixed
3 = Network
4 = CD-ROM
5 = RAM Disk
Code:
<%
dim filesys
set filesys = CreateObject("Scripting.FileSystemObject")
Set drv = filesys.GetDrive("c")
select case drv.DriveType
   case 0: drtype = "Unknown"
   case 1: drtype = "Removable"
   case 2: drtype = "Fixed"
   case 3: drtype = "Network"
   case 4: drtype = "CD-ROM"
   case 5: drtype = "RAM Disk" 
end select
Response.Write ("The specified drive is a " & drtype & " type disk.")
%>

Output:
The specified drive is a Fixed type disk.


Copyright 1999-2001 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information