All Properties
Drive Object
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