FORMAT
Formats 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.
Syntax
FORMAT 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>.
Parameter
drive:
Specifies the drive containing the disk you want to format. You must
specify a drive parameter. If you do not specify any of the following
switches, FORMAT uses the drive type to determine the default format for
the disk.
If the disk was previously formatted and you do not use the /U switch,
the old file allocation table and root directory are saved to allow
unformatting of the disk if necessary. If you realize that you formatted
the wrong disk, use the <UNFORMAT> command as soon as possible.
Switches
/V:label
Specifies the volume label. A volume label identifies the disk and can
be a maximum of 11 characters. If you omit the /V switch or use it
without specifying a volume label, MS-DOS prompts you for the volume
label after the formatting is completed. If you format more than one
disk by using one FORMAT command, all of the disks will be given the
same volume label. The /V switch is not compatible with the /8 switch.
For more information about disk volume labels, see the DIR, LABEL, and
VOL commands.
/Q
Specifies a quick format of a disk. With this switch, FORMAT deletes the
file allocation table (FAT) and the root directory of a previously
formatted disk, but does not scan the disk for bad areas. Use the /Q
switch to format only previously formatted disks that you know are in
good condition.
/U
Specifies an unconditional format of a disk. Unconditional formatting
destroys all existing data on a disk and prevents you from later
"unformatting" the disk. You should use /U if you have received read and
write errors during use of a disk. For information about unformatting a
disk, see the UNFORMAT command.
/F:size
Specifies the size of the floppy disk to format. When possible, use this
switch instead of the /T and /N switches. Use one of the following
values for size:
160 (or 160K or 160KB)
160K, single-sided, double-density, 5.25-inch disk
180 (or 180K or 180KB)
180K, single-sided, double-density, 5.25-inch disk
320 (or 320K or 320KB)
320K, double-sided, double-density, 5.25-inch disk
360 (or 360K or 360KB)
360K, double-sided, double-density, 5.25-inch disk
720 (or 720K or 720KB)
720K, double-sided, double-density, 3.5-inch disk
1200 (or 1200K or 1200KB or 1.2 or 1.2M or 1.2MB)
1.2-MB, double-sided, quadruple-density, 5.25-inch disk
1440 (or 1440K or 1440KB or 1.44 or 1.44M or 1.44MB)
1.44-MB, double-sided, quadruple-density, 3.5-inch disk
2880 (or 2880K or 2880KB or 2.88 or 2.88M or 2.88MB)
2.88-MB, double-sided, extra-high-density, 3.5-inch disk
/B
Reserves space for the system files IO.SYS and MSDOS.SYS (as hidden
files) on a newly formatted disk. In previous versions of MS-DOS, it was
necessary to reserve this space before using the SYS command to copy the
system files to the disk. This switch is maintained in MS-DOS version
6.0 for compatibility reasons only.
/S
Copies the operating system files IO.SYS, MSDOS.SYS, and COMMAND.COM
from your system's startup drive to a newly formatted disk that you can
use as a system disk. If FORMAT cannot find the operating system files,
it prompts you to insert a system disk.
/T:tracks
Specifies the number of tracks on the disk. When possible, use the /F
switch instead of this switch. If you use the /T switch, you must also
use the /N switch. These two switches provide an alternative method of
specifying the size of the disk being formatted. You cannot use the /F
switch with the /T switch.
/N:sectors
Specifies the number of sectors per track. When possible, use the /F
switch instead of this switch. If you use the /N switch, you must * also
use the /T switch. These two switches provide an alternative method of
specifying the size of the disk being formatted. You cannot use the /F
switch with the /N switch.
/1
Formats a single side of a floppy disk.
/4
Formats a 5.25-inch, 360K, double-sided, double-density floppy disk on a
1.2-MB disk drive. Some 360K drives cannot reliably read disks formatted
with this switch. When used with the /1 switch, this switch formats a
5.25-inch, 180K, single-sided floppy disk.
/8
Formats a 5.25-inch disk with 8 sectors per track. This switch formats a
floppy disk to be compatible with MS-DOS versions earlier than 2.0.
/C
Retests bad clusters. By default, if a drive contains clusters that have
been marked as "bad", FORMAT does not retest the clusters; it simply
leaves them marked "bad". Use the /C switch if you want FORMAT to retest
all bad clusters on the drive. (In previous versions of MS-DOS, FORMAT
always retested any bad clusters.)
Related Command
For information about restoring disks after using the FORMAT command, see
the <UNFORMAT> command.
|