home *** CD-ROM | disk | FTP | other *** search
/ Shareware Gold 1 / The_Golden_ROM_Series_-_Shareware_Gold_Volume_1_Number_11_-_SK_89-301_-_1989.iso / LIB040 / WORKDISK.BAT < prev    next >
DOS Batch File  |  1988-11-30  |  6KB  |  199 lines

  1. echo off
  2. echo .
  3. echo Now Making a PC-Write Work Disk
  4. echo This will NOT affect CONFIG.SYS or AUTOEXEC.BAT files.
  5. echo .
  6. set v=123456789012345678901234567890
  7. if %v%==123456789012345678901234567890 goto a
  8. echo Not enough "environment" memory.
  9. goto z
  10. :a
  11. set v=
  12. getyn √ \%1
  13. if not errorlevel 1 goto c
  14. echo The "%1" after WORKDISK must end in ":", or "\" for a directory, as in:
  15. echo   WORKDISK C:\PCW\
  16. goto z
  17. :c
  18. set t=%1
  19. set b=2
  20. set w=1
  21. getyn Do you have 5.25 inch floppy disks? (Y if so, N if 3.5 inch)
  22. if not errorlevel 1 goto e
  23. set b=3
  24. set w=2
  25. :e
  26. getyn Do you want to make backup copies of the PC-Write diskettes?
  27. if errorlevel 1 goto f
  28. set b=0
  29. :f
  30. if %b%==0 goto g
  31. getyn Do you have %b% blank, formatted diskettes ready, for backups?
  32. if not errorlevel 1 goto z
  33. set d=%2
  34. if %2x==x set d=B:
  35. getyn Backups will be made on the %d% drive, ok?
  36. if errorlevel 1 goto g
  37. echo Enter a command like "WORKDISK C:\PCW\ A:" or "WORKDISK A: A:" where the first
  38. echo name is where to make your work disk, and the second is the drive for backups.
  39. goto z
  40. :g
  41. getyn Are you installing on a hard disk? (Y if so, N if on floppy)
  42. echo .
  43. if errorlevel 1 goto h
  44. getyn Do you have %w% blank, formatted diskettes to make work disks?
  45. if not errorlevel 1 goto z
  46. if %1x==x set t=B:
  47. getyn Work diskettes will be made on the %t% drive, ok?
  48. if errorlevel 1 goto i
  49. echo Enter a command like WORKDISK A: to select the drive you want.
  50. goto z
  51. :h
  52. set w=0
  53. if not %1x==x goto j
  54. getyn Your work directory will be C:\PCW\, ok?  Press Y if unsure.
  55. if errorlevel 1 goto k
  56. echo Enter a command like WORKDISK C:\PCW\ to select the directory you want.
  57. goto z
  58. :k
  59. echo If C:\PCW\ already exists, ignore "unable to create directory" message.
  60. echo on
  61. mkdir C:\PCW
  62. echo off
  63. set t=c:\pcw\
  64. :j
  65. getyn Your work directory will be %t%, ok?
  66. :i
  67. echo .
  68. :q
  69. if exist ed.exe goto r
  70. getyn Insert PC-Write Program diskette in default drive, press Y.
  71. if not errorlevel 1 goto z
  72. goto q
  73. :r
  74. getyn Do you want to put your registration number on the front screen?
  75. if not errorlevel 1 goto s
  76. echo This takes a minute...
  77. ed =
  78. if errorlevel 1 goto r
  79. :s
  80. getyn Do you want to put your own special message on the front screen?
  81. if not errorlevel 1 goto t
  82. echo This takes a minute...
  83. ed +
  84. if errorlevel 1 goto s
  85. :t
  86. if %b%==0 goto u
  87. getyn Insert blank disk for Program Disk backup in drive %d%,  press Y.
  88. if not errorlevel 1 goto u
  89. echo on
  90. copy *.* %d%
  91. echo off
  92. :u
  93. if %w%==0 goto v
  94. getyn Insert blank disk to become the Work Disk in drive %t%,  press Y.
  95. if not errorlevel 1 goto z
  96. :v
  97. copy getyn.com %t%()
  98. getyn ε %t%()
  99. if errorlevel 1 goto l
  100. echo Cannot copy files to %t%; have to cancel WORKDISK process.
  101. echo Check that %t% has enough room and is not write-protected.
  102. echo If %t% is a directory, make sure it ends with a final "\".
  103. echo If %t% does not exist, use the MKDIR %t% command WITHOUT
  104. echo the final "\" to create it; for example:  MKDIR C:\PCW
  105. goto z
  106. :l
  107. if not exist () goto n
  108. if %w%==0 goto o
  109. echo The default drive, %t%, is also where you want to make
  110. echo work disks. Run WORKDISK again, giving another drive.
  111. goto p
  112. :o
  113. echo The default directory, %t%, is also where you want your
  114. echo work directory. Create a different work directory,
  115. echo and run WORKDISK again giving this other directory.
  116. :p
  117. del %t%()
  118. goto z
  119. :n
  120. del %t%()
  121. echo .
  122. getyn Do you want to copy the main PC-Write program? Press Y if unsure.
  123. if errorlevel 1 copy ed.exe %t%ed.exe
  124. echo .
  125. getyn ε %t%pr.exe
  126. if not errorlevel 1 goto w
  127. getyn Your file PR.EXE is obsolete;  delete it now?  Press Y if unsure.
  128. if errorlevel 1 del %t%pr.exe
  129. :w
  130. echo Older PC-Write versions used the PR command to print from DOS.
  131. echo   Now the ED command with /P switch is used to print from DOS.
  132. echo   You can have a PR.BAT file to still print with a PR command.
  133. getyn Do you want this PR command to print from DOS? Press N if unsure.
  134. if not errorlevel 1 goto x
  135. echo ED %%1 %%2 %%3 %%4 %%5 %%6 /P > %t%pr.bat
  136. :x
  137. echo .
  138. set h=0
  139. echo Main Help file has 45 help screens but takes 75K of disk space.
  140. echo   There are smaller beginner and advanced Help files available.
  141. getyn Do you want this main PC-Write Help file?  Press Y if unsure.
  142. if not errorlevel 1 goto b
  143. copy ed.hlp %t%ed.hlp
  144. set h=1
  145. :b
  146. if errorlevel 1 copy ed.hlp %t%ed.hlp
  147. echo .
  148. getyn Do you want to make an Edit Control File?  Press Y if unsure.
  149. if not errorlevel 1 goto y
  150. copy ed.def %t%ed.def
  151. getyn Are you using a Tandy 1000/3000 keyboard?  Press N if unsure.
  152. if not errorlevel 1 goto d
  153. copy ed.trs %t%ed.def
  154. echo These Tandy keyboards are not standard, so you will need to substitute some
  155. goto kb
  156. :d
  157. getyn Is your keyboard sometimes "incompatible"? Press N if unsure.
  158. if not errorlevel 1 goto kc
  159. copy ed.spc %t%ed.def
  160. echo The edit control file ED.SPC may help. You will need to substitute some keys,
  161. :kb
  162. echo such as Ctl-V for Scroll Lock. Look at the file ED.DEF for a complete list.
  163. :kc
  164. getyn Do you want to edit on a color monitor ?   Press N if unsure.
  165. if errorlevel 1 echo %%C >> %t%ed.def
  166. getyn Do you want the three reminder lines on?   Press Y if unsure.
  167. if errorlevel 1 echo %%M >> %t%ed.def
  168. getyn Do you want automatic save every 5 min.?   Press Y if unsure.
  169. if errorlevel 1 echo %%R] &R:5 >> %t%ed.def
  170. set m=n
  171. getyn Press Y to get one inch margins by default; N for no margins.
  172. if not errorlevel 1 goto y
  173. set m=y
  174. echo  L---+---T1----+-T--2----T----3--T-+----4T---+---T5----+-T--6----R----7--T-+-- >> %t%ed.def
  175. echo  .X:10 >> %t%ed.def
  176. echo  .XT:6 >> %t%ed.def
  177. echo  .XB:6 >> %t%ed.def
  178. :y
  179. if exist menuprt1.exe goto m
  180. getyn Do you have a copy of the PC-Write Utility diskette?
  181. if errorlevel 1 goto cu
  182. echo Without the utility diskette, you can't use printer
  183. echo enhancements like bold and underline, or use a mouse.
  184. echo However, you can do normal editing and basic printing.
  185. goto z
  186. :cu
  187. getyn Insert PC-Write Utility diskette in default drive, press Y.
  188. if not errorlevel 1 goto z
  189. :m
  190. echo.
  191. WORKUTIL
  192. :z
  193. set t=
  194. set b=
  195. set h=
  196. set d=
  197. set m=
  198. set w=
  199.