Formatting made easy. (formatting disks) (Column)
by Tony Roberts
Formatting disks is one of computing's most annoying tasks, but with the help of a couple of undocumented commands, the process can be made more tolerable.
I find disk formatting vexing because the makers of formatting software are so determined to protect us from our own foolishness that they make us answer several questions confirming that we really want to perform the format.
OK, I'll concede that it's wise to have some safeguards against accidentally formatting your hard disk, but there ought to be a less painful way to format a box of floppies. Well, there is--they just didn't tell us about it.
MS-DOS 4.01 and MS-DOS 5.0 include some undocumented switches that can eliminate the prompts that instruct you to place a new disk in the drive and ask if you want to format another disk.
(Warning: These commands also eliminate the prompts that remind you the you're about to wipe out your hard disk. Be sure you know what you're doing before you try these commands. Read on for some safeguards.)
The switches are /autotest and /backup. Type format a: / autotest, for example, to jump right in and format whatever disk is in drive A. You won't see the disk statistics, and you won't be asked if you want to format another disk.
The /backup switch is similar to, but slightly more verbose than, the /autotest switch. Type format a: /backup to begin formatting immediately. When the format is complete, the program will prompt you for a label and will display the disk statistics before returning you to the DOS prompt.
These undocumented switches can speed up your disk formatting by cutting down on the prompts displayed, but can you take advantage of this without risking the accidental erasure of important data? With a little care, yes.
First, if you're using DOS 5.0, you'll find that even with these switches, the Format command will collect the information that's needed by the Unformat command. This can help you recover if you accidentally format the wrong disk.
Second, you should reserve these commands for mass formatting projects. When you format a new box of disks, for example, you know that there's no valuable data on the disks, so it makes sense to proceed as quickly as possible.
Finally, you should limit these fast-format switches to batch files so you can test to make sure the Format command won't be used on a hard disk.
Take a look at the batch file below, called multifmt.bat. This program is designed to format several disks in the same drive with a minimum of operator intervention. After things get rolling, you need to press a key only when you swap disks.
To protect your hard disk, the program verifies that you've specified either the A or B drive as your target. If the drive designation checks out, the format proceeds immediately. Otherwise you get a message reminding you to specify a valid disk drive. At the end of the process, you're summoned with a beep. At that point, insert a new disk and press a key to continue formatting, or press Ctrl+Break to get out of the program.
By default, the /autotest and /backup switches format the target disk at its maximum capacity. If you want to format double density disks in a high density drive, be sure to add the appropriate size specification switches. For example, type multifmt b: /f:720 to format 720KB disks in a 1.44MB drive.
To really speed things along, you can use the documented /u switch to tell the Format command not to worry about saving Unformat information. This switch is appropriate with brand new disks, but it may not be suitable for disks you're reusing.
I like to keep several formatted floppies on hand so I don't have to interrupt
my work for formatting chores. I find it convenient to run multifmt.bat
whenever I take time to straighten up the off ice. When the program beeps, I
insert a new disk, press a key, and return to my cleanup. By the time my desk
is clear, I have a fresh stack of formatted disks to carry me through the next
week. rem multifmt.bat @echo off for %%f in (a: A: b: B:) do if (%%f)==(%l)
goto continue goto help :continue format %1 /autotest %2 %3 %4 echo Change
disks to continue formatting or press Ctrl-Break to quit. rem The following
echo command produces three beeps. To create it, use rem a text editor that
allows you to enter a Ctrl-G character ASCII 7) rem to create the beep. (This
line can be omitted if you prefer.) echo