Easy Tutorial
❮ Coll Staticobjects App Met Contents Removeall Sess ❯

ASP Drive Object


The Drive object is used to return information about the local disk drives or network shared drives.


Try It - Examples

Get the total capacity of a specified drive

Get the available space of a specified drive

Get the free space capacity of a specified drive

Get the drive letter of a specified drive

Get the drive type of a specified drive

Get the file system information of a specified drive

Is the drive ready?

Get the path of a specified drive

Get the root folder of a specified drive

Get the serial number of a specified drive


Drive Object

The Drive object is used to return information about local disk drives or network shared drives. The Drive object can return information about the file system type, free capacity, serial number, volume label name, etc., of the drive.

Note: You cannot return information about the contents of the drive through the Drive object. To achieve this, use the Folder object.

To manipulate the properties of the Drive object, you need to create an instance of the Drive object through the FileSystemObject object. First, create a FileSystemObject object, then instantiate the Drive object using the GetDrive method or the Drives property of the FileSystemObject object.

The properties of the Drive object are described as follows:

Properties

Property Description
AvailableSpace Returns the available space capacity on the specified drive or network shared drive.
DriveLetter Returns the uppercase letter that identifies the local drive or network shared drive.
DriveType Returns the type of the specified drive.
FileSystem Returns the file system used by the specified drive.
FreeSpace Returns the free space capacity on the specified drive or network shared drive.
IsReady Returns true if the specified drive is ready; otherwise, returns false.
Path Returns the uppercase letter followed by a colon, indicating the path name of the specified drive.
RootFolder Returns a folder object that represents the root folder of the specified drive.
SerialNumber Returns the serial number of the specified drive.
ShareName Returns the network share name of the specified drive.
TotalSize Returns the total capacity of the specified drive or network shared drive.
VolumeName Sets or returns the volume label name of the specified drive.
❮ Coll Staticobjects App Met Contents Removeall Sess ❯