Function Reference


Returns the status of the drive as a string.

DriveStatus ( "path" )


path Path of drive to receive information from.

Return Value

Value Interpretation
$DS_UNKNOWN ("UNKNOWN") Drive may be unformatted (RAW).
$DS_READY@DOUBLE_WS ("READY") Typical of hard drives and drives that contain removable media.
$DS_NOTREADY@DOUBLE_WS ("NOTREADY") Typical of floppy and CD drives that do not contain media.
$DS_INVALID ("INVALID") May indicate the drive letter does not exist or that a mapped network drive is inaccessible.

Constants are defined in "AutoItConstants.au3".


The list of possible return values may be incomplete.
DriveStatus() may even work when a complete directory path (which exists) is given. However, a file path won't work.


CDTray, DriveGetDrive, DriveGetFileSystem, DriveGetLabel, DriveGetSerial, DriveGetType, DriveSetLabel, DriveSpaceFree, DriveSpaceTotal, FileExists


#include <MsgBoxConstants.au3>

Local $sStatus = DriveStatus(@HomeDrive & "\") ; Find the status of the home drive, generally this is the C:\ drive.
MsgBox($MB_SYSTEMMODAL, "", "Status: " & $sStatus)