label (command)

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search

In computing, label is a command included with some operating systems (e.g., DOS,[1] OS/2 and Microsoft Windows[2]). 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.


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


  • 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.


  • /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.


C:\Users\root>label D: Backup

Supported file systems[edit]


FAT volume labels[edit]

  • Volume labels can contain as many as 11 character bytes and can include spaces, but no tabs. The characters are in the OEM code page of the system that created the label.
  • Volume labels cannot contain the following characters: ? / \ | . , ; : + = [ ] < > "
  • Volume labels are stored as upper-case regardless of whether they contain lower-case letters.

NTFS volume labels[edit]

  • Volume labels can contain as many as 32 Unicode characters.

See also[edit]


  1. ^ Jamsa, Kris A. (1993), DOS: The Complete Reference, Osborne McGraw-Hill, ISBN 0078819040. 
  2. ^ Microsoft TechNet Vol article