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

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

Error Handling

An exception is thrown on failure.

Related

DriveGetLabel, Drive functions

Examples

#1

DriveSetLabel("C:", "Seagate200")