Drive Functions

Functions for retrieving information about the computer's drive(s) or for performing various operations on a drive. Click on a function name for details.

Function Description
DriveEject Ejects the tray of the specified CD/DVD drive, or ejects a removable drive.
DriveGetCapacity Returns the total capacity of the drive which contains the specified path, in megabytes.
DriveGetFileSystem Returns the type of the specified drive's file system.
DriveGetLabel Returns the volume label of the specified drive.
DriveGetList Returns a string of letters, one character for each drive letter in the system.
DriveGetSerial Returns the volume serial number of the specified drive.
DriveGetSpaceFree Returns the free disk space of the drive which contains the specified path, in megabytes.
DriveGetStatus Returns the status of the drive which contains the specified path.
DriveGetStatusCD Returns the media status of the specified CD/DVD drive.
DriveGetType Returns the type of the drive which contains the specified path.
DriveLock Prevents the eject feature of the specified drive from working.
DriveRetract Retracts the tray of the specified CD/DVD drive.
DriveSetLabel Changes the volume label of the specified drive.
DriveUnlock Restores the eject feature of the specified drive.

Error Handling

An exception is thrown on failure.

List of all functions

Examples

Allows the user to select a drive in order to analyze it.

folder := DirSelect( , 3, "Pick a drive to analyze:")
if not folder
    return
MsgBox
(
    "All Drives: " DriveGetList() "
    Selected Drive: " folder "
    Drive Type: " DriveGetType(folder) "
    Status: " DriveGetStatus(folder) "
    Capacity: " DriveGetCapacity(folder) " MB
    Free Space: " DriveGetSpaceFree(folder) " MB
    Filesystem: " DriveGetFilesystem(folder) "
    Volume Label: " DriveGetLabel(folder) "
    Serial Number: " DriveGetSerial(folder)
)