DriveSetLabel

Changes the volume label of the specified drive.

DriveSetLabel Drive , NewLabel

Parameters

Drive

Type: String

The drive letter followed by a colon and an optional backslash (might also work on UNC paths and mapped drives).

NewLabel

Type: String

If omitted, the drive will have no label. Otherwise, specify the new label to set.

Error Handling

An exception is thrown on failure.

DriveGetLabel, Drive functions

Examples

Changes the volume label of the C drive.

DriveSetLabel "C:", "Seagate200"