Function Reference


DriveGetLabel

Returns Volume Label of a drive, if it has one.

DriveGetLabel ( "path" )

Parameters

path Path of drive to receive information from.

Return Value

Success: the Volume Label of the drive as a string.
Failure: sets the @error flag to 1.

Related

DriveGetDrive, DriveGetFileSystem, DriveGetSerial, DriveGetType, DriveSetLabel, DriveSpaceFree, DriveSpaceTotal, DriveStatus

Example

#include <MsgBoxConstants.au3>

Local $sLabel = DriveGetLabel(@HomeDrive & "\") ; Find the volume label of the home drive, generally this is the C:\ drive.
MsgBox($MB_SYSTEMMODAL, "", "Volume Label: " & $sLabel)