August 1999
Intermediate to advanced
1488 pages
72h 53m
English
driveobject.DriveType
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.
| Value | Description |
|---|---|
| 0 | Unknown |
| 1 | Removable |
| 2 | Fixed |
| 3 | Network |
| 4 | CD-ROM |
| 5 | RAM Disk |
Listing 9.28 retrieves the drive type for the specified drive.
<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)); ... |
Read now
Unlock full access