DriveGetLabel

Returns the volume label of the specified drive.

Label := DriveGetLabel(Drive)

Parameters

Drive

Type: String

The drive letter followed by a colon and an optional backslash, or a UNC name such \server1\share1.

Return Value

Type: String

This function returns the volume label of the specified drive.

Error Handling

An exception is thrown on failure.

Related

DriveSetLabel, Drive functions

Examples

See example #1 on the Drive Functions page for a demonstration of this function.