Draft for Information Only
ContentMS DOS Command: FORMAT.COM
MS DOS Command: FORMAT.COMReference from Microsoft MS-DOS cmd help DescriptionFormats a disk for use with MS-DOS. The FORMAT command creates a new root directory and file allocation table for the disk. It can also check for bad areas on the disk, and it can delete all data on the disk. In order for MS-DOS to be able to use a new disk, you must first use this command to format the disk. SyntaxFORMAT drive: [/V[:label]] [/Q] [/U] [/F:size][/B|/S] [/C]
FORMAT drive: [/V[:label]] [/Q] [/U] [/T:tracks /N:sectors] [/B|/S] [/C]
FORMAT drive: [/V[:label]] [/Q] [/U] [/1] [/4] [/B|/S] [/C]
FORMAT drive: [/Q] [/U] [/1] [/4] [/8] [/B|/S] [/C]
Warning: Do not format a floppy disk at a size higher than it was designed for. For more information, see Format--Notes. Parameters
Switches
Related CommandFor information about restoring disks after using the FORMAT command, see the UNFORMAT command. RemarksFormatting a floppy diskDo not format a floppy disk at a size higher than it was designed for. For example, do not format a 360K floppy disk at 1.2MB. Also, if you use the FORMAT command without specifying the size of the floppy disk, MS-DOS will format the floppy disk at the disk capacity of the disk drive. Thus, if you format a floppy disk without specifying the size, be careful not to use a floppy disk smaller than the capacity of the disk drive. Typing a volume labelAfter formatting a floppy disk, FORMAT displays the following message: Volume label (11 characters, ENTER for none)? The volume label can be a maximum of 11 characters (including spaces). If you do not want your disk to have a volume label, press ENTER. For information about volume labels, see the LABEL command. Formatting a hard diskWhen you use the FORMAT command to format a hard disk, MS-DOS displays a message similar to the following before attempting to format the hard disk: WARNING, ALL DATA ON NON-REMOVABLE DISK DRIVE x: WILL BE LOST! Proceed with Format (Y/N)?_ To format the hard disk, press Y; if you do not want to format the disk, press N. FORMAT messagesWhen formatting is complete, MS-DOS displays messages showing the total disk space, any space marked as defective, the total space used by the operating system (if you used the /S or /B switch), and the space available for your files. Safe formattingIf you do not specify the /U switch or a switch that reformats the disk to a different size, FORMAT performs a "safe" format. It clears the file allocation table and root directory of the disk but does not delete any data. You can then use the UNFORMAT command to recover the disk if you did not intend to format the disk. FORMAT also checks each sector on the disk to ensure that the sector can properly store data. If it locates a sector that cannot store data, FORMAT marks that sector to prevent MS-DOS from using it. If you specify the /U switch or any switch that changes the size of the disk, FORMAT performs an unconditional format by deleting all data on the disk. Quick formattingYou can speed up the formatting process by using the /Q switch. Use this switch only if you have not received read or write errors on your disk. You can speed up the process even more by using both the /Q and /U switches. If you use the /U switch, FORMAT does not save the information necessary to later unformat the disk. Formatting a new diskWhen you use FORMAT to format a disk that has never been formatted, you can specify the switches /U /C to reduce formatting time. If you are using DriveSpace and don't often use compressed floppies, you might also want to disable the AutoMount feature to further reduce formatting time. To do this, use the DRVSPACE /AUTOMOUNT command, or turn off the Automount option in the Options dialog (start DriveSpace, and then choose Options from the Tools menu). Using format with a SUBST drive or a network driveYou should not use the FORMAT command on a drive prepared by using the SUBST command. You cannot format disks over a network or an Interlnk drive. FORMAT exit codesThe following list shows each exit code and a brief description of its meaning:
You can check these exit codes by using the ERRORLEVEL condition with the IF batch command. For an example of a batch program that supports ERRORLEVEL conditions, see the CHOICE command. ExamplesTo format a new floppy disk in drive A using the default size, type the following command: format a: To perform a quick format on a previously formatted disk in drive A, type the following command: format a: /q To format a floppy disk in drive A, completely deleting all data on the disk, type the following command: format a: /u To format a 360K floppy disk in drive A and copy the operating system files to the disk to make it a system disk, type the following command: format a: /f:360 /s To format a floppy disk in drive A and assign to it the volume label "DATA", type the following command: format a: /v:DATA ©sideway ID: 110700189 Last Updated: 7/27/2011 Revision: 0 Latest Updated Links
![]() ![]() ![]() ![]() ![]() |
![]() Home 5 Business Management HBR 3 Information Recreation Hobbies 8 Culture Chinese 1097 English 339 Travel 18 Reference 79 Computer Hardware 254 Software Application 213 Digitization 37 Latex 52 Manim 205 KB 1 Numeric 19 Programming Web 289 Unicode 504 HTML 66 CSS 65 SVG 46 ASP.NET 270 OS 431 DeskTop 7 Python 72 Knowledge Mathematics Formulas 8 Set 1 Logic 1 Algebra 84 Number Theory 206 Trigonometry 31 Geometry 34 Calculus 67 Engineering Tables 8 Mechanical Rigid Bodies Statics 92 Dynamics 37 Fluid 5 Control Acoustics 19 Natural Sciences Matter 1 Electric 27 Biology 1 |
Copyright © 2000-2025 Sideway . All rights reserved Disclaimers last modified on 06 September 2019