The FORMAT Command

To make a floppy or hard disk capable of storage, DOS creates tracks and sectors on a disk. This process of creating tracks and sectors on a disk is called formatting. To understand this concept better, assume that you have a long roll of blank paper. To make this roll of paper usable (for writing), it could be cut into pieces about a foot long, and then lines and page numbers could be put on every sheet. You could consider this to be the equivalent of formatting whereby the disk is made usable.

After formatting is complete, the disk is divided into tracks that are concentric circles. Tracks are further divided into portions called sectors. Data is stored on these sectors as magnetic patterns.

Each track and sector has a number. During formatting, DOS also checks for defective spots and displays the number of bad sectors on the screen.

Assume that you have bought a new floppy disk and want to copy some files from the C disk to this disk.

For this, you have to first format the diskette because a brand new diskette cannot be used for storing data. All new disks have to be formatted before data can be stored on them. However, some diskettes are pre-formatted by the manufacturer.

The command for formatting a floppy disk in the A drive is:

C> FORMAT A: <Enter>

After you issue this command, the following message appears:

C>FORMATA:

Insert new diskette for drive A:

And strike Enter when ready

At this point, you insert a blank, unformatted disk in drive A and press the <Enter> key to begin the format. When the format program has ended, the following message will be flashed on the screen:

Format another (Y/N)?

If you want to format another blank disk, you press Y (for yes) and insert another blank, unformatted disk in drive A. If you do not want to format another disk, you press N (for no) to end the format program.

Old disks that already contain data can also be formatted if data is not required and the disk is needed for usage. In this case, all the old data is lost after the formatting procedure is completed. This is usually done if an old disk has certain bad sectors and is needed for usage. The FORMAT command must be used with extreme caution. Any disk that you format will lose all the data that existed on it before the formatting operation.

It is very important that you specify the drive name while issuing this command. The proper syntax for this command is:

FORMAT<drive name>

Be careful when you use the FORMAT command and ensure that you enter the right drive name.

FORMAT is an external command. In order to execute this command, the DOS file FORMAT.COM must be present. In contrast, there will be no program file called DIR.COM to execute the DIR command.

F0RMAT.COM is usually available along with the DOS software.

If you wish to specify a volume label for your disk, you may do so with the FORMAT command. In this case, the N option may be used. A volume label helps in identifying the disk and can be up to 11 characters in length. The command to be issued to give a volume label to a floppy disk at the time of formatting is:

C>FORMAT A:/V <Enter>

Another option that can be used with the FORMAT command is /S. If you issue the command:

C:>FORMATA:/S <Enter>

The operating system files are transferred from the C disk to the A disk, and the disk will be formatted. Now this floppy disk can also be used to load DOS into the computer's memory. The system files cannot be copied using the COPY command. In order to use a floppy disk to load DOS, the disk has to be formatted using the/S option.

If the operating system software (DOS) is available on the hard disk, you are prompted to insert a DOS diskette in the A drive.