What is the Vol Command?:
Note: The dir command also shows the volume label and volume serial number of a drive before displaying the drive's contents.
The vol command is also a DOS command available in MS-DOS.
Vol Command Syntax:
vol [drive:] [/?]
drive: = This is the letter of the drive that you want to view the volume label and volume serial number for.
Tip: You can save to a file the volume label and volume serial number displayed with the vol command by using a redirection operator. See How To Redirect Command Output to a File for instructions or see Command Prompt Tricks for more tips.
Vol Command Examples:
In the above example, the vol command is used to display the volume label and volume serial number for the e drive. The result displayed on screen will look something like this:
Volume in drive E is MediaDrive Volume Serial Number is C0Q3-A19F
As you can see, the volume label is reported as MediaDrive and the volume serial number as C0A3-A19F. Obviously those results will differ when you run the vol command.
Using the vol command as shown above, without specifying a drive, will return the volume label and volume serial number of the current drive.
Volume in drive C has no label. Volume Serial Number is D4E8-E115
In this example we can see that the C drive has no volume label and the volume serial number is D4E8-E115.
Note: Volume labels are not required in any file system supported in Windows.
Vol Command Availability:
The vol command is also available in MS-DOS.
Note: The availability of certain vol command switches and other vol command syntax may differ from operating system to operating system.
Vol Related Commands:
The volume label of a drive is necessary information for a few different commands, including the format command the convert command.