home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.whtech.com
/
ftp.whtech.com.tar
/
ftp.whtech.com
/
club100
/
pg
/
pggene
/
cluste.bat
next >
Wrap
DOS Batch File
|
2006-10-19
|
4KB
|
134 lines
@echo off
rem Update 01/12/2000 Bob Pigford
rem I'm not sure what this program is for but it is for
rem an MSDOS computer, not a Tandy100/102/200
cls
echo CLUSTER.BAT (c) 1991 by Paul Globman [72227,1661]
echo .
REM
IF '%1'=='CONT' GOTO CONT
echo WARNING
echo -------
echo Do NOT run this program from the built-in Manager, or
echo any other DOS shell program. Run only from the MS-DOS
echo ">" prompt. Use CTRL-C to abort, if necessary, and
echo restart program.
echo -------------------------------------------------------
echo .
echo The following procedure will reduce the Cluster size
echo from 4K to 1K. This will result in the recovery of
echo a lot of wasted disk space. There should be no loss
echo of speed when accessing files.
echo .
echo The only requirements are this file, CLUSTER.BAT,
echo and DEBUG.COM to be in the same directory when you
echo run this program.
echo .
IF NOT EXIST DEBUG.COM GOTO NO_DBG
pause
cls
ECHO @ECHO OFF>A.BAT
ECHO SET SIZE=ONE>>A.BAT
ECHO SET DISK=YES>>A.BAT
ECHO CLUSTER CONT>>A.BAT
ECHO @ECHO OFF>B.BAT
ECHO SET SIZE=TWO>>B.BAT
ECHO SET DISK=YES>>B.BAT
ECHO CLUSTER CONT>>B.BAT
ECHO @ECHO OFF>C.BAT
ECHO SET SIZE=ONE>>C.BAT
ECHO SET DISK=NO>>C.BAT
ECHO CLUSTER CONT>>C.BAT
ECHO @ECHO OFF>D.BAT
ECHO SET SIZE=TWO>>D.BAT
ECHO SET DISK=NO>>D.BAT
ECHO CLUSTER CONT>>D.BAT
REM
echo SELECT YOUR OPTIONS
echo --------------------
echo A) 1 Meg with Floppy
echo B) 2 Meg with Floppy
echo C) 1 Meg without Floppy
echo D) 2 Meg without Floppy
echo .
prompt SELECT$G
goto done
:CONT
FOR %%A IN (A.BAT B.BAT C.BAT D.BAT) DO DEL %%A
echo There are five (5) steps to this procedure...
echo ---------------------------------------------
echo (1) Complete Silicon disk backup
echo (2) Modification to Hard Disk Boot Sector
echo (3) Cold boot system with CTRL-ALT-FN-DEL
echo (4) Format C: drive
echo (5) Restore backed up files
echo ---------------------------------------------
if %disk%==YES goto disk_yes
echo Step (1) must be done manually. If you have
echo not backed up your silicon hard disk, and wish
echo to do so, press CTRL-C, manually backup the
echo silicon hard disk, and begin again. OR...
goto mod
:disk_yes
echo To begin step (1)... Silicon Disk Backup
echo you will need 1 (or more) formatted diskettes
echo to backup files currently in the Silicon disk.
echo .
echo If you do not have the required diskettes then
echo press CTRL-C to abort the procedure and begin
echo again after formatting the required diskettes.
echo .
:BACKUP
pause
echo XCOPY A:\ C:\ /S>C:\COPYBACK.BAT
XCOPY C:\ A:\ /S/M
IF ERRORLEVEL 4 GOTO AGAIN
echo .
echo Backup complete! For your convenience,
echo COPYBACK.BAT has been installed in the
echo ROOT directory of each backup diskette.
echo .
echo To begin step (2)... Modify HD Boot Sector
echo .
GOTO MOD
:AGAIN
echo Change disks then
goto backup
:MOD
pause
echo L 0100 02 00 01>CLUSTER.scr
echo D 0100>>CLUSTER.scr
echo E 010D>>CLUSTER.scr
echo 02>>CLUSTER.scr
echo E 0116>>CLUSTER.scr
if %size%==TWO echo 08>>CLUSTER.scr
if %size%==ONE echo 03>>CLUSTER.scr
echo D 0100>>CLUSTER.scr
echo W 0100 02 00 01>>CLUSTER.scr
echo q>>CLUSTER.scr
debug < CLUSTER.scr >nul
del CLUSTER.scr
echo .
echo Boot Sector Modification Complete
echo .
if %disk%==YES echo *** REMOVE DISK FROM FLOPPY DRIVE A: ***
echo .
pause
cls
echo You must perform the following tasks manually.
echo AFTER pressing CTRL-ALT-FN-DELETE, select the
echo [F]ORMAT option from the Application Menu.
echo .
echo *** DO NOT select the Initialize option!! ***
echo .
echo When the format is complete, restore backed up
echo files. You will now be working with 1K clusters.
echo .
echo OK...Press CTRL-ALT-FN-DELETE now...
:loop
goto loop
:NO_DBG
ECHO Cannot find DEBUG.COM...
:DONE