home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Media Share 9
/
MEDIASHARE_09.ISO
/
utility
/
pbaseiv.zip
/
P4DOS007.TIP
< prev
next >
Wrap
Text File
|
1991-12-16
|
3KB
|
78 lines
My computer, like many others, uses two sizes of floppy
disks. Drive A: is for 5 1/4-inch disks and drive B: for 3
1/2-inch disks. In the past, every time I needed to format
disks, I had to reach for the DOS manual to find the right
command-line switches for, say, a 720K disk in drive B:.
To simplify matters, I wrote the batch file FORMAT.BAT [see
listing]. To use it, rename your formatting program (for
instance, the DOS program FORMAT.COM or the PC Tools
PCFORMAT program) to FORMAT!.COM. Then freely format
floppies with the commands FORMAT 360, FORMAT 12, FORMAT
720, or FORMAT 144.
Ed Quillen
Salida, Colorado
Editor's note: I like this solution better than others I've
seen, many of which are prone to errors. It also has a nice
(possibly unintended) side effect: it makes it tougher to
accidentally reformat your hard disk. (You must type
FORMAT!, or whatever name you gave the original FORMAT.COM
program, to do that.)
Use the Alt-F command to save the listing below as
FORMAT.BAT in a directory on your path so you can use it
from inside any directory. Then modify the drive letters in
the batch file, if necessary, to correspond to your
configuration. (If your system doesn't support all four
kinds of disks, you may want to add error messages for
unsupported sizes.) Finally, rename DOS's FORMAT.COM command
to FORMAT!.COM, so that the batch file will always get
control of the formatting process.
Postscript: Since we printed this tip, MS-DOS 5.0 was
released -- and, ironically, its FORMAT program contains
an /F:size switch that works almost exactly like this batch.
Thus, this batch is useful primarily for users who haven't
upgraded to DOS 5.
FORMAT.BAT: This intelligent floppy formatting batch file
can make formatting a floppy as easy as mentioning its
intended capacity.
---- BEGIN LISTING ----
@ECHO OFF
REM FORMAT.BAT
REM Rename DOS FORMAT.COM to FORMAT!.COM
IF NOT "%1"=="" GOTO %1
:HELP
ECHO You must specify what type of disk you want to format.
ECHO FORMAT 360 will produce a 360-kb disk in drive A:
ECHO FORMAT 12 will produce a 1.2-mb disk in drive A:
ECHO FORMAT 720 will produce a 720-kb disk in drive B:
ECHO FORMAT 144 will produce a 1.44-mb disk in drive B:
GOTO DONE
:360
C:\DOS\FORMAT! A: /N:09 /T:40 %2 %3 %4
GOTO DONE
:12
C:\DOS\FORMAT! A: /N:15 /T:80 %2 %3 %4
GOTO DONE
:720
C:\DOS\FORMAT! B: /N:09 /T:80 %2 %3 %4
GOTO DONE
:144
C:\DOS\FORMAT! B: /N:18 /T:80 %2 %3 %4
:DONE
---- END LISTING ----
Title: Fancy Floppy Formatter
Category: DOS
Issue date: Jul 1991
Editor: Brett Glass
Supplementary files: NONE