Creates, changes, or deletes the volume label (name) of a disk.
The operating system displays the volume label as part of the directory listing. If a volume serial number exists, it displays this number as well.
LABEL /?
To specify that the operating system is to display the current volume label and serial number v4.0, if they exist, and the operating system will prompt you to enter a label or delete the existing one:
LABEL
For information about displaying the current disk label, see the
DIR or
VOL command.
For information about the volume serial number of a disk, see
the VOL command.
Equivalent Linux BASH commands:
hostname - Print or set system name.
uname - Print system information.
If you do not specify a label when you use the LABEL command, the operating system displays a message in the format:
Volume in drive A is xxxxxxxxxxx Volume Serial Number is xxxx-xxxx Volume label (11 characters, ENTER for none)?
The "Volume Serial Number" part of the message is not displayed if the disk has no serial number.
You can type the volume label you want or press ENTER to delete the current label. If a disk has a label and you press ENTER for none, the operating system prompts you with the message:
Delete current volume label (Y/N)? Press Y to delete the label; press N to keep the label.
A volume label can contain as many as 11 characters and can include spaces but no tabs. Consecutive spaces may be interpreted as a single space.
Do not use any of the characters in a volume label:
* ? / \ | . , ; : + = [ ] ( ) & ^ < > "
The operating system displays volume labels in uppercase letters. If you enter a volume label in lower-case letters, the LABEL command converts the letters to uppercase.
LABEL does not work on a drive created with the SUBST command.
To label a disk in drive A that contains sales information for 1991, you might type:
LABEL A:SALES1991
none.