Drive Object

The Drive object represents a physical drive. This drive can exist on your machine, or it can be a drive shared by another machine. The Drive object's properties are listed in Table 19.1. Except for VolumeName, the properties in Table 19.1 are all read-only.

Table 19.1. Drive Object Properties

Property

Description

AvailableSpace*

Indicates the amount of space (in bytes) left on the drive or network share represented by the Drive object.

DriveLetter

A string value representing the physical drive letter or share name for the Drive object.

DriveType

One of the following integer values representing the type of drive:

0—Unknown

1—Removable

2—Fixed

3—Network

4—CD-ROM

5—RAM Disk

FileSystem*

A string value representing the file system used to format the drive represented by the Drive object. Some possible return values are FAT, FAT32, NTFS, and CDFS.

FreeSpace

A long integer representing the number of bytes of space available on the drive. This is the same value as that for the AvailableSpace property unless the drive represented by the Drive object supports quotas.

IsReady*

A Boolean value that indicates whether the drive represented by the Drive object is ready for operation.

Path

The physical path of the drive represented by the Drive object.

RootFolder

Returns the Folder object (described later in this chapter) that is the root folder for the drive represented by the Drive object. The RootFolder property has a Folders property that returns a Folders ...

Get ASP in a Nutshell, 2nd Edition 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.