home *** CD-ROM | disk | FTP | other *** search
/ ftp.whtech.com / ftp.whtech.com.tar / ftp.whtech.com / club100 / pg / pggene / cluste.bat next >
DOS Batch File  |  2006-10-19  |  4KB  |  134 lines

  1. @echo off
  2. rem Update 01/12/2000 Bob Pigford
  3. rem I'm not sure what this program is for but it is for
  4. rem an MSDOS computer, not a Tandy100/102/200
  5. cls
  6. echo CLUSTER.BAT  (c) 1991 by Paul Globman [72227,1661]
  7. echo .
  8. REM 
  9. IF '%1'=='CONT' GOTO CONT
  10. echo WARNING
  11. echo -------
  12. echo Do NOT run this program from the built-in Manager, or
  13. echo any other DOS shell program.  Run only from the MS-DOS
  14. echo ">" prompt.  Use CTRL-C to abort, if necessary, and
  15. echo restart program.
  16. echo -------------------------------------------------------
  17. echo .
  18. echo The following procedure will reduce the Cluster size
  19. echo from 4K to 1K.  This will result in the recovery of
  20. echo a lot of wasted disk space.  There should be no loss
  21. echo of speed when accessing files.
  22. echo .
  23. echo The only requirements are this file, CLUSTER.BAT,
  24. echo and DEBUG.COM to be in the same directory when you
  25. echo run this program.
  26. echo .
  27. IF NOT EXIST DEBUG.COM GOTO NO_DBG
  28. pause
  29. cls
  30. ECHO @ECHO OFF>A.BAT
  31. ECHO SET SIZE=ONE>>A.BAT
  32. ECHO SET DISK=YES>>A.BAT
  33. ECHO CLUSTER CONT>>A.BAT
  34. ECHO @ECHO OFF>B.BAT
  35. ECHO SET SIZE=TWO>>B.BAT
  36. ECHO SET DISK=YES>>B.BAT
  37. ECHO CLUSTER CONT>>B.BAT
  38. ECHO @ECHO OFF>C.BAT
  39. ECHO SET SIZE=ONE>>C.BAT
  40. ECHO SET DISK=NO>>C.BAT
  41. ECHO CLUSTER CONT>>C.BAT
  42. ECHO @ECHO OFF>D.BAT
  43. ECHO SET SIZE=TWO>>D.BAT
  44. ECHO SET DISK=NO>>D.BAT
  45. ECHO CLUSTER CONT>>D.BAT
  46. REM
  47. echo SELECT YOUR OPTIONS
  48. echo --------------------
  49. echo A) 1 Meg with Floppy
  50. echo B) 2 Meg with Floppy
  51. echo C) 1 Meg without Floppy
  52. echo D) 2 Meg without Floppy
  53. echo .
  54. prompt SELECT$G
  55. goto done
  56. :CONT
  57. FOR %%A IN (A.BAT B.BAT C.BAT D.BAT) DO DEL %%A
  58. echo There are five (5) steps to this procedure...
  59. echo ---------------------------------------------
  60. echo (1) Complete Silicon disk backup
  61. echo (2) Modification to Hard Disk Boot Sector
  62. echo (3) Cold boot system with CTRL-ALT-FN-DEL
  63. echo (4) Format C: drive
  64. echo (5) Restore backed up files
  65. echo ---------------------------------------------
  66. if %disk%==YES goto disk_yes
  67. echo Step (1) must be done manually.  If you have
  68. echo not backed up your silicon hard disk, and wish
  69. echo to do so, press CTRL-C, manually backup the
  70. echo silicon hard disk, and begin again.  OR...
  71. goto mod
  72. :disk_yes
  73. echo To begin step (1)... Silicon Disk Backup
  74. echo you will need 1 (or more) formatted diskettes
  75. echo to backup files currently in the Silicon disk.
  76. echo .
  77. echo If you do not have the required diskettes then
  78. echo press CTRL-C to abort the procedure and begin
  79. echo again after formatting the required diskettes.
  80. echo .
  81. :BACKUP
  82. pause
  83. echo XCOPY A:\ C:\ /S>C:\COPYBACK.BAT
  84. XCOPY C:\ A:\ /S/M
  85. IF ERRORLEVEL 4 GOTO AGAIN
  86. echo .
  87. echo Backup complete!  For your convenience,
  88. echo COPYBACK.BAT has been installed in the
  89. echo ROOT directory of each backup diskette.
  90. echo .
  91. echo To begin step (2)... Modify HD Boot Sector
  92. echo .
  93. GOTO MOD
  94. :AGAIN
  95. echo Change disks then
  96. goto backup
  97. :MOD
  98. pause
  99. echo L 0100 02 00 01>CLUSTER.scr
  100. echo D 0100>>CLUSTER.scr
  101. echo E 010D>>CLUSTER.scr
  102. echo 02>>CLUSTER.scr
  103. echo E 0116>>CLUSTER.scr
  104. if %size%==TWO echo 08>>CLUSTER.scr
  105. if %size%==ONE echo 03>>CLUSTER.scr
  106. echo D 0100>>CLUSTER.scr
  107. echo W 0100 02 00 01>>CLUSTER.scr
  108. echo q>>CLUSTER.scr
  109. debug < CLUSTER.scr >nul
  110. del CLUSTER.scr
  111. echo .
  112. echo Boot Sector Modification Complete
  113. echo .
  114. if %disk%==YES echo *** REMOVE DISK FROM FLOPPY DRIVE A: ***
  115. echo .
  116. pause
  117. cls
  118. echo You must perform the following tasks manually.
  119. echo AFTER pressing CTRL-ALT-FN-DELETE, select the
  120. echo [F]ORMAT option from the Application Menu.
  121. echo .
  122. echo *** DO NOT select the Initialize option!! ***
  123. echo .
  124. echo When the format is complete, restore backed up
  125. echo files.  You will now be working with 1K clusters.
  126. echo .
  127. echo OK...Press CTRL-ALT-FN-DELETE now...
  128. :loop
  129. goto loop
  130. :NO_DBG
  131. ECHO Cannot find DEBUG.COM...
  132. :DONE
  133.  
  134.