Skip to content

dos_label

Dale Fugier edited this page Jul 1, 2026 · 1 revision

Returns or changes the volume label of a specified disk.

Syntax

(dos_label [drive [label]])

Parameters

drive

The drive name (for example, C:, D:). If not specified, the current drive is used.

label

The volume label. If not specified, the volume label is returned.

Return

A string identifying the volume label if successful.

nil on error.

Examples

Command: (dos_label)
"DRIVE-C"

Command: (dos_label "D:" "drive-d")
"DRIVE-D"

Clone this wiki locally