Home > Commands A-M > Commands L

LABEL


Description | Syntax | Parameters | Switches | Related | Notes | Examples | Errorlevels | Availability

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.


Syntax

LABEL /?

LABEL [drive:][label]

LABEL [/MP] [volume] [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


Parameters
drive: (v3.0 Win95 NT3.1)
Specifies the location of the disk you want to name.
You must include a colon (:) between drive and label.
label (v3.0 Win95 NT3.1)
Specifies the new 11-character volume label.
volume (NT2000)
Specifies the drive letter (followed by a colon), mount point, or volume name. If volume name is specified, the /MP flag is unnecessary.

Switches
/? (NTXP)
Displays help.
/MP (NT2000)
Specifies that the volume should be treated as a mount point or volume name.

Related

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.


Notes
LABEL command messages

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.

Limitations on volume label names

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.


Using LABEL with a redirected drive

LABEL does not work on a drive created with the SUBST command.


Examples

To label a disk in drive A that contains sales information for 1991, you might type:

    LABEL A:SALES1991

Errorlevels

none.


Availability
External
DOS
v3.0 v3.20 v3.05 v3.1 v3.21 v3.25 v3.30 v3.3A v3.3R v3.3T v3.31 v3.40 v4.0 v4.01 v4.01A v5.0 v5.0A v5.00.02 v5.001A v5.01 v5.02 v6.0 v6.10 v6.2 v6.21 v6.22 v6.23 v7.00 v7.0R1 v7.10 v8.00
Windows
Win95 Win98 WinME
Windows NT
NT3.1 NT3.5 NT3.51 NT4 NT2000 NTXP NT2003

Last Updated: 2006/12/01
Direct corrections or suggestions to: Rick Lively 1