Drive.DriveType

JScript3.0+Syntax

							driveobject.DriveType

Description

The DriveType property of the Drive object contains a numeric value indicating type of the specified drive. The values associated with the DriveType are listed in Table 9.5.

Table 9.5. Drive Type Value Definitions
ValueDescription
0Unknown
1Removable
2Fixed
3Network
4CD-ROM
5RAM Disk

Example

Listing 9.28 retrieves the drive type for the specified drive.

Listing 9.28 Display the Drive Type
<script language="JScript">
<!-- Hide //Create a string to hold the drive path var drivePath = "C:"; //Create a file system object var fileSysObj = new ActiveXObject("Scripting.FileSystemObject"); //Create a Drive object for drive C Drive.FreeSpace var drive = fileSysObj.GetDrive(fileSysObj.GetDriveName(drivePath)); ...

Get Pure JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.