label (command)

From Wikipedia, the free encyclopedia

In some operating systems (e.g., DOS, OS/2 and Microsoft Windows) label is a command within the command line interpreters (shells) such as COMMAND.COM and cmd.exe. It is used to create, change, or delete a volume label on a logical drive, such as a hard disk partition or a floppy disk. Used without parameters, label changes the current volume label or deletes the existing label.

In Unix and other Unix-like operating systems, the name of the equivalent command differs from file system to file system. For instance, the command e2label can be used for ext2 partitions.

Contents

[edit] Syntax

LABEL [drive:][label]
LABEL [/MP] [volume] [label]

Arguments:

  • drive: This command-line argument specifies the drive letter of a drive.
  • label Specifies the label of the volume.
  • volume Specifies the drive letter (followed by a colon), mount point, or volume name.

Flags:

  • /MP Specifies that the volume should be treated as a mount point or volume name.

Note: If volume name is specified, the /MP flag is unnecessary.

[edit] Example

C:\Users\root>label D: Backup

[edit] Supported file systems

[edit] Limitations

[edit] FAT volume labels

  • Volume labels can contain as many as 11 characters and can include spaces but no tabs.
  • Volume labels cannot contain the following characters: ? / \ | . , ; : + = [ ] < > "
  • Volume labels are stored as uppercase regardless of whether they contain lowercase letters.

[edit] NTFS volume labels

  • Volume labels can contain as many as 32 characters.

[edit] See also

[edit] References