label (command)
{{lowercase title}}
{{Infobox software
| name = label
| logo =
| screenshot =
| screenshot size =
| caption =
| developer = Microsoft, IBM, Digital Research, Novell, Joe Cosentino, ReactOS Contributors
| released = {{Start date and age|1984|08}}
| latest release version =
| latest release date =
| operating system = MS-DOS, PC DOS, SISNE plus, OS/2, eComStation, ArcaOS, Windows, DR DOS, ROM-DOS, PTS-DOS, FreeDOS, ReactOS
| platform = Cross-platform
| genre = Command
| license = MS-DOS, PC DOS, Windows, OS/2: Proprietary commercial software
FreeDOS, ReactOS: GNU General Public License
| website = {{URL|https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/label}}
}}
In computing, label
is a command included with some operating systems (e.g., DOS,{{Citation
| last1 = Jamsa
| first1 = Kris A.
| title = DOS: The Complete Reference
| publisher = Osborne McGraw-Hill
| page =
| year = 1993
| isbn = 0078819040
| url = https://books.google.com/books?id=UW9GAAAAYAAJ
| postscript= .
}} IBM OS/2,{{cite web |url=http://www.jatomes.com/Help/Os2Cmd.php#LABEL |title=JaTomes Help - OS/2 Commands |website=www.jatomes.com |url-status=dead |archive-url=https://web.archive.org/web/20190414130029/http://www.jatomes.com/Help/Os2Cmd.php |archive-date=2019-04-14}} Microsoft Windows[https://technet.microsoft.com/en-us/library/bb490925.aspx Microsoft TechNet Label article] and ReactOShttps://github.com/reactos/reactos/blob/master/base/shell/cmd/label.c {{Dead link|date=February 2022}}). 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.
History
File:5.25-floppy-front.jpg with hand-written label on it.]]
The command was originally designed to label floppy disks as a reminder of which one is in the machine. However, it can also be applied to other types of drive such as mapped drives.[https://ss64.com/nt/label.html Label - Disk label - Windows CMD - SS64.com]
It is available in MS-DOS versions 3.1 and later and IBM PC DOS releases 3 and later.{{Cite book|author-last=Wolverton|author-first=Van|title=Running MS-DOS Version 6.22 (20th Anniversary Edition), 6th Revised edition|date=2003|publisher=Microsoft Press|isbn=0-7356-1812-7}}
It is an external command. MS-DOS 4.0x and earlier used label.com
as the external file. MS-DOS 5.0 and Windows use label.exe
as the external file.[https://www.computerhope.com/labelhlp.htm MS-DOS and Windows command line label command] DR DOS 6.0 includes an implementation of the {{code|label}} command.{{cite web |url=https://www.4corn.co.uk/archive/docs/DR%20DOS%206.0%20User%20Guide-opt.pdf |title=DR DOS 6.0 User Guide Optimisation and Configuration Tips |access-date=2019-08-12 |archive-url=https://web.archive.org/web/20190930135943/http://www.4corn.co.uk/archive/docs/DR%20DOS%206.0%20User%20Guide-opt.pdf |archive-date=2019-09-30 |url-status=dead }} The FreeDOS version was developed by Joe Cosentino and is licensed under the GPL.{{cite web|url=http://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/1.2/repos/pkg-html/label.html |title=FreeDOS 1.2 Updates Package - label (FreeDOS Base) |publisher=Ibiblio.org |date=2021-11-19 |accessdate=2022-09-04}}
In modern versions of Microsoft Windows, changing the disk label requires elevated permissions. The Windows dir
command displays the volume label and serial number (if it has one) as part of the directory listing.
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.
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.
Example for the command.
C:\Users\root>label D: Backup
Supported file systems
Limitations
=FAT volume labels=
FAT volumes have the following limitations:
- 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=
- NTFS volume labels can contain as many as 32 Unicode characters.
See also
- Vol (command) — Displays the disk volume label and serial number.
- List of DOS commands
References
{{Reflist}}
Further reading
- {{Cite book|author-last=Cooper|author-first=Jim|title=Special Edition Using MS-DOS 6.22, Third Edition|date=2001|publisher=Que Publishing|isbn=978-0789725738}}
- {{Cite book|author1=Tim O'Reilly|author2=Troy Mott|author3=Walter Glenn|year=1999|title=Windows 98 in a Nutshell: A Desktop Quick Reference|publisher=O'Reilly|isbn=978-1565924864|url-access=registration|url=https://archive.org/details/windows98innutsh00orei}}
- {{Cite book|author=John Paul Mueller|year=2007|title=Windows Administration at the Command Line for Windows Vista, Windows 2003, Windows XP, and Windows 2000|publisher=John Wiley & Sons|isbn=978-0470165799}}
External links
{{Wikibooks|Guide to Windows Commands}}
- [https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/label label | Microsoft Docs]
{{Windows commands}}
Category:External DOS commands