home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Media Share 9
/
MEDIASHARE_09.ISO
/
utility
/
dos5gbag.zip
/
MFORMAT5.ZIP
/
MFORMAT.BAT
next >
Wrap
DOS Batch File
|
1991-07-26
|
1KB
|
46 lines
@ECHO OFF
REM This is MFORMAT.BAT
:SIZE
CLS
ECHO === CHOOSE A DISK SIZE ===
ECHO 1 360K
ECHO 2 720K
ECHO 3 1.20M
ECHO 4 1.44M
ECHO 5 2.88M
ECHO (Or press Esc to quit)
SNIFF
IF ERRORLEVEL 255 GOTO BYE
IF ERRORLEVEL 54 GOTO SIZE
IF ERRORLEVEL 53 IF NOT ERRORLEVEL 54 SET SIZ=2.88MB
IF ERRORLEVEL 52 IF NOT ERRORLEVEL 53 SET SIZ=1.44MB
IF ERRORLEVEL 51 IF NOT ERRORLEVEL 52 SET SIZ=1.2MB
IF ERRORLEVEL 50 IF NOT ERRORLEVEL 51 SET SIZ=720K
IF ERRORLEVEL 49 IF NOT ERRORLEVEL 50 SET SIZ=360K
:DRIV
CLS
ECHO === CHOOSE A DRIVE ===
ECHO A Drive A:
ECHO B Drive B:
ECHO (Or press Esc to quit)
SET DRV=
SNIFF
IF ERRORLEVEL 255 GOTO BYE
IF ERRORLEVEL 67 GOTO DRIV
IF ERRORLEVEL 66 IF NOT ERRORLEVEL 67 SET DRV=B:
IF ERRORLEVEL 65 IF NOT ERRORLEVEL 66 SET DRV=A:
IF !%DRV%==! GOTO DRIV
:CHECK
CLS
ECHO Format drive %DRV% for a %SIZ% disk (Y/N)?
SNIFF
IF ERRORLEVEL 255 GOTO BYE
IF ERRORLEVEL 89 IF NOT ERRORLEVEL 90 GOTO DOIT
IF ERRORLEVEL 78 IF NOT ERRORLEVEL 79 GOTO SIZE
GOTO CHECK
:DOIT
FORMAT %DRV% /F:%SIZ%
:BYE
SET SIZ=
SET DRV=