###   Projekte und Informationen rund um den KC85   ### 

 

CFOG's PIP, May 1989, Volume 8 No. 2, Whole No. 70, page 19

Hidden Gold in DOS 3.3

by Bob Lay

[This article originally appeared in Q-Bits for December 1988 -- bhc]

PC Magazine's productivity section, in the 27 December 1988 issue, carries a super tip about an undocumented feature implemented in MS/PC-DOS version 3.3 making formatting using both floppy drives sequentially a cinch (assuming, of course, that you HAVE two floppy drives). The tip is by Dan Gookin, and describes a /H switch available when using FORMAT.

What the switch does is cause DOS tot skip the "Insert disk and press any key" message. Thus the command:

FORMAT A: /H<cr>

would cause drive A: to start formatting with no further user input.

PC Mag's gurus went one step further and listed a short BAT file that uses this switch and some of DOS's other commands to allow you to format disks (alternately) in drive A: then B: then A: and so on, without requiring anything of the user except to keep inserting and removing disks.

I added a %1 %2 %3 so I could pass some other parameters to the FORMAT command if I wanted to. I've named my version of thent BAT file FORMATAB.BAT so that I can issue the command

FORMATAB<cr>

formatting of disks at 1.2 Mb immediately starts in the A: drive and as soon as it's done the B: drives starts formatting, and as soon as it's done it's back to the A: drive. and so on until you leave a drive door open, with or without a disk in it. (That's how you turn this off!)

If I want to format 360K disks the command is simply:

FORMATAB /4<cr>

and because of the %1 statement in the BAT file the /4 parameter is passed causing the 1.2 Mb drive to format 360K disks.

The only parameter that I've not been able to pass is /V <volume name>. That requires keyboard input from the user upon completion of formatting and, in my case anyway, just causes the system to lock and not accept any input. The other switches, such as /S, /8 and so forth, seem to be "passable" with no problem.

Create a file called FORMATAB.BAT using the non-document mode of your word processor or a pure ASCII text editor and you'll be all set. The REM lines are REMarks that DOS ignores: leave them out if you want. [On the other hand, they will help you to remember what this file is about when you look at it a year from now. -- bhc]

REM  The /H switch is an undocumented
REM feature of DOS 3.3 which makes
REM FORMAT skip the "insert disk and
REM press any key" message. From
REM PC MAG V7 #22 12/27/88 page 286
REM and Q-Bits December 1988 issue
ECHO OFF
:LOOP
ECHO N |FORMAT A: /H %1 %2 %3
IF ERRORLEVEL 1 GOTO NoMore
ECHO PUT a new disk in drive A: now.
ECHO N | FORMAT B: /H %1 %2 %3
IF ERRORLEVEL 1 GOTO NoMore
ECHO PUT a new disk in drive B: now.
GOTO LOOP
:NoMore
ECHO DONE FORMATTING AND WE'RE OUTTA HERE

The ECHO N | pipes a "N"o answer to DOS's final "Format another" query, freeing the batch file to go to the next drive and start formatting there.