home *** CD-ROM | disk | FTP | other *** search
/ Black Box 4 / BlackBox.cdr / progbas / gwbsu102.arj / FILE-MAN.BAS < prev    next >
BASIC Source File  |  1992-01-10  |  21KB  |  671 lines

  1. 10 'Label START
  2. 20 'Set up and print intro screen.
  3. 30 '
  4. 40 KEY OFF
  5. 50 CLS
  6. 60 PRINT "                   The GWBASIC 3.22 File Manager, Version 1
  7. 70 PRINT
  8. 80 PRINT
  9. 90 PRINT "                                By Matt Roberts
  10. 100 PRINT "                               3 Cedar St., # 8
  11. 110 PRINT "                           Montpelier, Vt 05602-3006
  12. 120 PRINT "                                 (802)223-2553
  13. 130 PRINT
  14. 140 PRINT
  15. 150 PRINT "If you find the files on this disk useful, a donation of $5.00 would
  16. 160 PRINT "be greatly appreciated.  Thanks.
  17. 170 PRINT
  18. 180 PRINT
  19. 190 PRINT
  20. 200 PRINT "If you have trouble running this program, and the documentation doesn't
  21. 210 PRINT "seem to help, you can call me between 9AM and 9PM EST, and I'll try to
  22. 220 PRINT "help.
  23. 230 PRINT
  24. 240 PRINT
  25. 250 PRINT
  26. 260 PRINT
  27. 270 'Wait for user to press a key; then continue.
  28. 280 GOSUB 6620
  29. 290 GOTO 430
  30. 300 'Label QUITPROG
  31. 310 '
  32. 320 'Here is the routine for leaving the program.
  33. 330 CLS
  34. 340 KEY ON
  35. 350 END
  36. 360 '
  37. 370 'Intro screen is now set up and printed.
  38. 380 '
  39. 390 '
  40. 400 'Now direct the program to create a menu of options.
  41. 410 '
  42. 420 'Here is the menu of options.
  43. 430 'Label MENU
  44. 440 CLS
  45. 450 ON ERROR GOTO 0
  46. 460 PRINT "                                 Your Options
  47. 470 PRINT
  48. 480 PRINT
  49. 490 PRINT "1- List files.
  50. 500 PRINT
  51. 510 PRINT "2- Work with CONFIG.SYS file.
  52. 520 PRINT
  53. 530 PRINT "3- Work with the AUTOEXEC.BAT file.
  54. 540 PRINT
  55. 550 PRINT "4- Delete Files.
  56. 560 PRINT
  57. 570 PRINT "5- Make Directory.
  58. 580 PRINT
  59. 590 PRINT "6- Remove Directory."
  60. 600 PRINT
  61. 610 PRINT "7- Rename Files."
  62. 620 PRINT
  63. 630 PRINT "8- Display File Contents."
  64. 640 PRINT
  65. 650 PRINT "9- Quit the Program."
  66. 660 PRINT
  67. 670 PRINT
  68. 680 INPUT "Please press the key corresponding to your choice; then press Enter. ",CHOICE
  69. 690 ON CHOICE GOSUB 770,970,2650,3730,4140,4420,5190,5530,300
  70. 700 GOTO 430
  71. 710 '
  72. 720 'This is the end of the menu.
  73. 730 '
  74. 740 '
  75. 750 '
  76. 760 'Here is the routine for looking at available files.
  77. 770 'Label SEEFILES
  78. 780 ON ERROR GOTO 0
  79. 790 'Label SEEFLAGN
  80. 800 CLS
  81. 810 PRINT "                                View Your Files
  82. 820 PRINT
  83. 830 PRINT
  84. 840 INPUT "Which directory";DIRECTORY$
  85. 850 FILES DIRECTORY$
  86. 860 'Label SKIP
  87. 870 PRINT
  88. 880 PRINT
  89. 890 INPUT "Would you like to view more files (y/n)";VIEWMORE$
  90. 900 IF VIEWMORE$="y" OR VIEWMORE$="Y" THEN 790 ELSE RETURN
  91. 910 '
  92. 920 'This is the end of the routine for looking at available files.
  93. 930 '
  94. 940 '
  95. 950 '
  96. 960 'Here is the routine for working with the CONFIG.SYS file.
  97. 970 'Label CHANGECON
  98. 980 ON ERROR GOTO 0
  99. 990 CLS
  100. 1000 PRINT "                      View or Change Your CONFIG.SYS File
  101. 1010 PRINT
  102. 1020 PRINT
  103. 1030 INPUT "On which drive is your CONFIG.SYS file";DRIVE$
  104. 1040 DRIVE$=DRIVE$+"\"
  105. 1050 'Label REDRIVE
  106. 1060 'Label CONFMENU
  107. 1070 CLS
  108. 1080 PRINT "You have the following options:
  109. 1090 PRINT
  110. 1100 PRINT
  111. 1110 PRINT "1- Just view the CONFIG.SYS file."
  112. 1120 PRINT
  113. 1130 PRINT "2- Add lines to the end of your file.
  114. 1140 PRINT
  115. 1150 PRINT "3- Create a new CONFIG.SYS file."
  116. 1160 PRINT
  117. 1170 PRINT "4- Return to the options menu.
  118. 1180 PRINT
  119. 1190 PRINT
  120. 1200 PRINT
  121. 1210 INPUT "Please press the number corresponding to your choice, and then press Enter. ",CHNGVIEW$
  122. 1220 IF CHNGVIEW$="1" THEN GOSUB 2190:GOTO 1060
  123. 1230 IF CHNGVIEW$="2" THEN GOSUB 2410:GOSUB 2190:GOTO 1060
  124. 1240 IF CHNGVIEW$="3" THEN 1320:GOTO 1060
  125. 1250 IF CHNGVIEW$="4" THEN RETURN
  126. 1260 GOTO 1060
  127. 1270 '
  128. 1280 '
  129. 1290 '
  130. 1300 'This section creates a new CONFIG.SYS file.
  131. 1310 '
  132. 1320 'Label NEWFILEC
  133. 1330 CLS
  134. 1340 IF DRIVE$="a:\" THEN FILE1$="a:\config.sys
  135. 1350 IF DRIVE$="A:\" THEN FILE1$="A:\CONFIG.SYS
  136. 1360 IF DRIVE$="b:\" THEN FILE1$="b:\config.sys
  137. 1370 IF DRIVE$="B:\" THEN FILE1$="B:\CONFIG.SYS
  138. 1380 IF DRIVE$="c:\" THEN FILE1$="c:\config.sys
  139. 1390 IF DRIVE$="C:\" THEN FILE1$="C:\CONFIG.SYS
  140. 1400 IF DRIVE$="d:\" THEN FILE1$="d:\config.sys
  141. 1410 IF DRIVE$="D:\" THEN FILE1$="D:\CONFIG.SYS
  142. 1420 IF DRIVE$="a:\" THEN FILE2$="a:\config.bas
  143. 1430 IF DRIVE$="A:\" THEN FILE2$="A:\CONFIG.BAS
  144. 1440 IF DRIVE$="b:\" THEN FILE2$="b:\config.bas
  145. 1450 IF DRIVE$="B:\" THEN FILE2$="B:\CONFIG.BAS
  146. 1460 IF DRIVE$="c:\" THEN FILE2$="c:\config.bas
  147. 1470 IF DRIVE$="C:\" THEN FILE2$="C:\CONFIG.BAS
  148. 1480 IF DRIVE$="d:\" THEN FILE2$="d:\config.bas
  149. 1490 IF DRIVE$="D:\" THEN FILE2$="D:\CONFIG.BAS
  150. 1500 NAME FILE1$ AS FILE2$
  151. 1510 PRINT
  152. 1520 PRINT
  153. 1530 PRINT "Your CONFIG.SYS file has been changed to CONFIG.BAS in order to save
  154. 1540 PRINT "it for future use.  To use it later it will have to be renamed to
  155. 1550 PRINT "CONFIG.SYS, after the current CONFIG.SYS has been renamed to
  156. 1560 PRINT "something else (for example, CONFIG.X)."
  157. 1570 PRINT
  158. 1580 PRINT
  159. 1590 PRINT
  160. 1600 GOSUB 6630
  161. 1610 'Label CHANGEAGN
  162. 1620 CLS
  163. 1630 OPEN FILE1$ FOR OUTPUT AS 1
  164. 1640 PRINT "How many files do you want (if you're not sure, type 20)?
  165. 1650 INPUT "To quit, press Q and Enter. ",FILENUMB$
  166. 1660 IF FILENUMB$="q" OR FILENUMB$="Q" THEN 2050
  167. 1670 PRINT# 1, "files=";FILENUMB$
  168. 1680 PRINT
  169. 1690 PRINT
  170. 1700 PRINT
  171. 1710 INPUT "How many buffers do you want (if you're not sure, type 5)";BUFFER$
  172. 1720 PRINT# 1, "buffers=";BUFFER$
  173. 1730 GOSUB 5900
  174. 1740 'Label DEVCAGAIN
  175. 1750 PRINT
  176. 1760 INPUT "Which device would you like to include (N for none)";DEVICE$
  177. 1770 IF DEVICE$="n" OR DEVICE$="N" THEN 1820
  178. 1780 PRINT# 1, "devices=";DEVICE$
  179. 1790 PRINT
  180. 1800 INPUT "Would you like to include more devices";INCLDMORE$
  181. 1810 IF INCLDMORE$="y" OR INCLDMORE$="Y" THEN 1740
  182. 1820 'Label NODEVICE
  183. 1830 PRINT
  184. 1840 INPUT "Do you want BREAK on or off (if not sure, type OFF)";BREAKYN$
  185. 1850 IF BREAKYN$="on" OR BREAKYN$="ON" THEN PRINT# 1, "BREAK=ON"
  186. 1860 CLOSE 1
  187. 1870 GOSUB 2190
  188. 1880 PRINT
  189. 1890 PRINT
  190. 1900 PRINT
  191. 1910 PRINT "If this is not O.K. AND you want to go back and change the file, press C and Enter."
  192. 1920 PRINT
  193. 1930 PRINT "To restore your original CONFIG.SYS file, press R and Enter."
  194. 1940 PRINT
  195. 1950 INPUT "If you're happy with it as is, type OK and Enter. ",CHANGE$
  196. 1960 'Label OKDECIDE
  197. 1970 IF CHANGE$="c" OR CHANGE$="C" THEN 1610
  198. 1980 IF CHANGE$="r" OR CHANGE$="R" THEN 2050
  199. 1990 IF CHANGE$="ok" OR CHANGE$="OK" THEN 1060
  200. 2000 PRINT
  201. 2010 INPUT "You must choose between C, R, or OK. ",CHANGE$
  202. 2020 GOTO 1960
  203. 2030 '
  204. 2040 '
  205. 2050 'Label RESTOREC
  206. 2060 CLS
  207. 2070 CLOSE 1
  208. 2080 KILL FILE1$
  209. 2090 NAME FILE2$ AS FILE1$
  210. 2100 PRINT "Your original CONFIG.SYS file has been restored.
  211. 2110 GOSUB 6630
  212. 2120 GOTO 1060
  213. 2130 '
  214. 2140 'This is the end of the routine for working with the CONFIG.SYS file.
  215. 2150 '
  216. 2160 '
  217. 2170 '
  218. 2180 'Here is the routine for looking at the CONFIG.SYS file.
  219. 2190 'Label SEESYS
  220. 2200 IF DRIVE$="a:\" THEN FILE$="a:\config.sys"
  221. 2210 IF DRIVE$="b:\" THEN FILE$="b:\config.sys"
  222. 2220 IF DRIVE$="c:\" THEN FILE$="c:\config.sys"
  223. 2230 IF DRIVE$="d:\" THEN FILE$="d:\config.sys"
  224. 2240 CLS
  225. 2250 PRINT "Here is your file:"
  226. 2260 PRINT
  227. 2270 OPEN FILE$ FOR INPUT AS 1
  228. 2280 WHILE NOT EOF(1)
  229. 2290 LINE INPUT#1, A$
  230. 2300 PRINT A$
  231. 2310 WEND:CLOSE
  232. 2320 GOSUB 6630
  233. 2330 RETURN
  234. 2340 '
  235. 2350 'This is the end of the routine for looking at the CONFIG.SYS file.
  236. 2360 '
  237. 2370 '
  238. 2380 '
  239. 2390 'Here is the routine for adding lines to the end of CONFIG.SYS
  240. 2400 '
  241. 2410 'Label APPENDLN
  242. 2420 IF DRIVE$="a:\" THEN FILE$="a:\config.sys
  243. 2430 IF DRIVE$="A:\" THEN FILE$="a:\config.sys
  244. 2440 IF DRIVE$="b:\" THEN FILE$="b:\config.sys
  245. 2450 IF DRIVE$="B:\" THEN FILE$="b:\config.sys
  246. 2460 IF DRIVE$="c:\" THEN FILE$="c:\config.sys
  247. 2470 IF DRIVE$="C:\" THEN FILE$="c:\config.sys
  248. 2480 IF DRIVE$="d:\" THEN FILE$="d:\config.sys
  249. 2490 IF DRIVE$="D:\" THEN FILE$="d:\config.sys
  250. 2500 OPEN FILE$ FOR APPEND AS 1
  251. 2510 GOSUB 5900
  252. 2520 'Label APPENDAGN
  253. 2530 PRINT
  254. 2540 INPUT "Line to add (Q to quit)";APPENDLN$
  255. 2550 IF APPENDLN$="q" OR APPENDLN$="Q" THEN CLOSE 1:RETURN
  256. 2560 PRINT# 1, APPENDLN$
  257. 2570 GOTO 2520
  258. 2580 '
  259. 2590 'This is the end of the routine for adding lines to CONFIG.SYS
  260. 2600 '
  261. 2610 '
  262. 2620 '
  263. 2630 'Here is the routine for working with the AUTOEXEC.BAT file.
  264. 2640 '
  265. 2650 'Label CHNGAUTO
  266. 2660 ON ERROR GOTO 0
  267. 2670 CLS
  268. 2680 PRINT "                    View or Change Your AUTOEXEC.BAT file.
  269. 2690 PRINT
  270. 2700 PRINT
  271. 2710 INPUT "On which drive is your AUTOEXEC.BAT file";DRIVE$
  272. 2720 DRIVE$=DRIVE$+"\"
  273. 2730 'Label REDRIVEA
  274. 2740 'Label AUTOMENU
  275. 2750 CLS
  276. 2760 PRINT "You have the following options:"
  277. 2770 PRINT
  278. 2780 PRINT
  279. 2790 PRINT "1- Just view the AUTOEXEC.BAT file."
  280. 2800 PRINT
  281. 2810 PRINT "2- Add lines to the end of your file."
  282. 2820 PRINT
  283. 2830 PRINT "3- Create a new AUTOEXEC.BAT file."
  284. 2840 PRINT
  285. 2850 PRINT "4- Return to the Main Options Menu."
  286. 2860 PRINT
  287. 2870 PRINT
  288. 2880 PRINT
  289. 2890 INPUT "Please press the number corresponding to your choice, and then press Enter. ",CHNGAUTO$
  290. 2900 IF CHNGAUTO$="1" THEN CLS:GOSUB 6130:GOTO 2740
  291. 2910 IF CHNGAUTO$="2" THEN CLS:GOSUB 6410:GOSUB 6130:GOTO 2740
  292. 2920 IF CHNGAUTO$="3" THEN CLS:GOTO 3000
  293. 2930 IF CHNGAUTO$="4" THEN CLS:RETURN
  294. 2940 GOTO 2740
  295. 2950 '
  296. 2960 '
  297. 2970 '
  298. 2980 'This routine creates a new AUTOEXEC.BAT file.
  299. 2990 '
  300. 3000 'Label NEWAUTO
  301. 3010 IF DRIVE$="a:\" THEN FILE1$="a:\autoexec.bat
  302. 3020 IF DRIVE$="A:\" THEN FILE1$="a:\autoexec.bat
  303. 3030 IF DRIVE$="b:\" THEN FILE1$="b:\autoexec.bat
  304. 3040 IF DRIVE$="B:\" THEN FILE1$="b:\autoexec.bat
  305. 3050 IF DRIVE$="c:\" THEN FILE1$="c:\autoexec.bat
  306. 3060 IF DRIVE$="C:\" THEN FILE1$="C:\autoexec.bat
  307. 3070 IF DRIVE$="d:\" THEN FILE1$="d:\autoexec.bat
  308. 3080 IF DRIVE$="D:\" THEN FILE1$="d:\autoexec.bat
  309. 3090 IF DRIVE$="a:\" THEN FILE2$="a:\autoexec.bas
  310. 3100 IF DRIVE$="A:\" THEN FILE2$="a:\autoexec.bas
  311. 3110 IF DRIVE$="b:\" THEN FILE2$="b:\autoexec.bas
  312. 3120 IF DRIVE$="B:\" THEN FILE2$="b:\autoexec.bas
  313. 3130 IF DRIVE$="c:\" THEN FILE2$="c:\autoexec.bas
  314. 3140 IF DRIVE$="C:\" THEN FILE2$="c:\autoexec.bas
  315. 3150 IF DRIVE$="d:\" THEN FILE2$="d:\autoexec.bas
  316. 3160 IF DRIVE$="D:\" THEN FILE2$="d:\autoexec.bas
  317. 3170 NAME FILE1$ AS FILE2$
  318. 3180 CLS
  319. 3190 PRINT "Your AUTOEXEC.BAT file has been changed to AUTOEXEC.BAS in order to
  320. 3200 PRINT "save it for later use.  To use it later, you will have to rename it
  321. 3210 PRINT "AUTOEXEC.BAT after renaming the current AUTOEXEC.BAT to something else
  322. 3220 PRINT "(for example, AUTOEXEC.X)."
  323. 3230 PRINT
  324. 3240 PRINT
  325. 3250 GOSUB 6630
  326. 3260 'Label SCNDCHNG
  327. 3270 CLS
  328. 3280 OPEN FILE1$ FOR OUTPUT AS 1
  329. 3290 PRINT "Please type the first line you want, then press Enter (Q to quit).
  330. 3300 PRINT
  331. 3310 INPUT "> ",FIRSTLN$
  332. 3320 IF FIRSTLN$="q" OR FIRSTLN$="Q" THEN GOTO 3600
  333. 3330 PRINT# 1, FIRSTLN$
  334. 3340 'Label CONTLINE
  335. 3350 PRINT
  336. 3360 PRINT "Please type your next line, followed by Enter (Q to quit).
  337. 3370 PRINT
  338. 3380 INPUT "> ",NEXTLINE$
  339. 3390 IF NEXTLINE$="q" OR NEXTLINE$="Q" THEN GOTO 3420
  340. 3400 PRINT# 1,NEXTLINE$
  341. 3410 GOTO 3340
  342. 3420 'Label STOPCHNG
  343. 3430 CLOSE # 1
  344. 3440 CLS
  345. 3450 GOSUB 6130
  346. 3460 PRINT
  347. 3470 PRINT
  348. 3480 PRINT
  349. 3490 PRINT "If this is not O.K. AND you want to change it, press C and then Enter.
  350. 3500 PRINT
  351. 3510 PRINT "To restore your original AUTOEXEC.BAT, press R and then Enter.
  352. 3520 PRINT
  353. 3530 INPUT "If you're happy with it as is, type OK and Enter. ",CHANGEYN$
  354. 3540 'Label RECHANGE
  355. 3550 IF CHANGEYN$="c" OR CHANGEYN$="C" THEN GOTO 3260
  356. 3560 IF CHANGEYN$="r" OR CHANGEYN$="R" THEN GOTO 3600
  357. 3570 IF CHANGEYN$="ok" OR CHANGEYN$="OK" THEN GOTO 2740
  358. 3580 PRINT
  359. 3590 INPUT "You must choose C, R, or OK. ",CHANGEYN$:GOTO 3540
  360. 3600 'Label NOCHANGE
  361. 3610 CLS
  362. 3620 CLOSE # 1
  363. 3630 KILL FILE1$
  364. 3640 NAME FILE2$ AS FILE1$
  365. 3650 PRINT "Your original AUTOEXEC.BAT file has been restored.":GOSUB 6630:GOTO 2740
  366. 3660 '
  367. 3670 'This is the end of the routine for working with the AUTOEXEC.BAT file.
  368. 3680 '
  369. 3690 '
  370. 3700 '
  371. 3710 ' Here is the routine for deleting files.
  372. 3720 '
  373. 3730 'LABEL killfile
  374. 3740 ON ERROR GOTO 0
  375. 3750 CLS
  376. 3760 PRINT "                                 Delete Files
  377. 3770 PRINT
  378. 3780 PRINT
  379. 3790 PRINT "Before going any further, you should be aware that, once a file has
  380. 3800 PRINT "been deleted, it is very difficult to retrieve it.  From this program,
  381. 3810 PRINT "it is impossible; there is no undelete option available.
  382. 3820 PRINT
  383. 3830 'LABEL deletagn
  384. 3840 INPUT "Press Enter to continue, or Q and Enter to quit. ",CONTYN$
  385. 3850 IF CONTYN$="q" OR CONTYN$="Q" THEN RETURN
  386. 3860 CLS
  387. 3870 PRINT "                                 Delete Files
  388. 3880 PRINT
  389. 3890 PRINT
  390. 3900 INPUT "File to delete (include drive and path)";FILE$
  391. 3910 PRINT
  392. 3920 PRINT
  393. 3930 PRINT "All the data in "FILE$;" will be destroyed.
  394. 3940 PRINT
  395. 3950 PRINT
  396. 3960 INPUT "Press Enter to continue or Q and Enter to quit. ",CONTYN$
  397. 3970 IF CONTYN$="q" OR CONTYN$="Q" THEN RETURN
  398. 3980 KILL FILE$
  399. 3990 PRINT
  400. 4000 PRINT
  401. 4010 PRINT FILE$" has been deleted.
  402. 4020 PRINT
  403. 4030 INPUT "Delete another";DELAGAIN$
  404. 4040 IF DELAGAIN$="y" OR DELAGAIN$="Y" THEN 3830
  405. 4050 PRINT
  406. 4060 RETURN
  407. 4070 '
  408. 4080 ' This is the end of the routine for deleting files.
  409. 4090 '
  410. 4100 '
  411. 4110 '
  412. 4120 ' Here is the routine for making a directory.
  413. 4130 '
  414. 4140 'LABEL makedir
  415. 4150 'on error goto 0
  416. 4160 CLS
  417. 4170 PRINT "                               Make a Directory"
  418. 4180 PRINT
  419. 4190 PRINT
  420. 4200 ' LABEL makeagn
  421. 4210 INPUT "Directory name (include drive and path) ",DIRECTORY$
  422. 4220 MKDIR DIRECTORY$
  423. 4230 PRINT
  424. 4240 PRINT
  425. 4250 PRINT "You have created directory: "DIRECTORY$
  426. 4260 PRINT
  427. 4270 PRINT
  428. 4280 INPUT "Would you like to make another directory";MAKEAGN$
  429. 4290 IF MAKEAGN$="y" OR MAKEAGN$="Y" THEN PRINT
  430. 4300 IF MAKEAGN$="y" OR MAKEAGN$="Y" THEN PRINT
  431. 4310 IF MAKEAGN$="y" OR MAKEAGN$="Y" THEN 4200
  432. 4320 IF MAKEAGN$="n" OR MAKEAGN$="N" THEN RETURN
  433. 4330 CLS
  434. 4340 GOTO 4280
  435. 4350 '
  436. 4360 ' This is the end of the routine for making directories.
  437. 4370 '
  438. 4380 '
  439. 4390 '
  440. 4400 'Here is the routine for removing directories.
  441. 4410 '
  442. 4420 'LABEL removdir
  443. 4430 ON ERROR GOTO 0
  444. 4440 CLS
  445. 4450 PRINT "                              Remove a Directory"
  446. 4460 PRINT
  447. 4470 PRINT
  448. 4480 PRINT "Before you can remove a directory, you must remove all files in that"
  449. 4490 PRINT "directory, and its subdirectories.  You must then remove all subdirectories."
  450. 4500 PRINT
  451. 4510 PRINT
  452. 4520 'LABEL removagn
  453. 4530 INPUT "Which drive (Q and Enter to quit)";DRIVE$
  454. 4540 IF DRIVE$="q" OR DRIVE$="Q" THEN RETURN
  455. 4550 PRINT
  456. 4560 INPUT "Directory name (include path) or Q to quit";DIRECTORY$
  457. 4570 'LABEL redir
  458. 4580 IF DIRECTORY$="q" OR DIRECTORY$="Q" THEN RETURN
  459. 4590 DIRECTORY$=DRIVE$+"\"+DIRECTORY$
  460. 4600 CLS
  461. 4610 PRINT "Here are the contents of "DIRECTORY$":"
  462. 4620 FILES DIRECTORY$+"\"
  463. 4630 PRINT "If this directory is not empty, you will have to delete any files and"
  464. 4640 PRINT "remove any subdirectories before you can remove it."
  465. 4650 PRINT
  466. 4660 PRINT
  467. 4670 'LABEL rdoptions
  468. 4680 PRINT "Here are your options:"
  469. 4690 PRINT
  470. 4700 PRINT "1- Delete directory files."
  471. 4710 PRINT
  472. 4720 PRINT "2- Remove subdirectories."
  473. 4730 PRINT
  474. 4740 PRINT "3- Continue."
  475. 4750 PRINT
  476. 4760 PRINT "4- Return to the Main Options Menu."
  477. 4770 PRINT
  478. 4780 INPUT "Please press the number corresponding to your choice, and then press Enter: ",DOWHAT$
  479. 4790 IF DOWHAT$="1" THEN CLS:GOTO 4930
  480. 4800 IF DOWHAT$="2" THEN CLS:GOTO 4520
  481. 4810 IF DOWHAT$="3" THEN CLS:GOTO 4830
  482. 4820 IF DOWHAT$="4" THEN CLS:RETURN
  483. 4830 'LABEL rmdrcont
  484. 4840 RMDIR DIRECTORY$
  485. 4850 PRINT
  486. 4860 PRINT
  487. 4870 PRINT "You have removed directory: "DIRECTORY$
  488. 4880 PRINT
  489. 4890 PRINT
  490. 4900 INPUT "Would you like to remove another directory";RMDAGAIN$
  491. 4910 IF RMDAGAIN$="y" OR RMDAGAIN$="Y" THEN 4520
  492. 4920 RETURN
  493. 4930 'LABEL deldirfl
  494. 4940 CLS
  495. 4950 PRINT "Here are the files in "DIRECTORY$":"
  496. 4960 PRINT
  497. 4970 PRINT
  498. 4980 FILES DIRECTORY$+"\"
  499. 4990 PRINT
  500. 5000 PRINT
  501. 5010 INPUT "Which file (include path, Q to quit)";WHICHFIL$
  502. 5020 IF WHICHFIL$="q" OR WHICHFIL$="Q" THEN CLS:FILES DIRECTORY$+"\":PRINT:PRINT:PRINT:PRINT:PRINT:GOTO 4670
  503. 5030 WHICHFIL$=DRIVE$+"\"+WHICHFIL$
  504. 5040 KILL WHICHFIL$
  505. 5050 PRINT
  506. 5060 PRINT
  507. 5070 PRINT WHICHFIL$" has been deleted."
  508. 5080 PRINT
  509. 5090 INPUT "Delete another";ANOTHER$
  510. 5100 IF ANOTHER$="y" OR ANOTHER$="Y" THEN 4930
  511. 5110 CLS:FILES DIRECTORY$+"\":PRINT:PRINT:PRINT:PRINT:PRINT:GOTO 4670
  512. 5120 '
  513. 5130 'This is the end of the routine for removing directories.
  514. 5140 '
  515. 5150 '
  516. 5160 '
  517. 5170 'Here is the routine for renaming files.
  518. 5180 '
  519. 5190 'LABEL renfile
  520. 5200 ON ERROR GOTO 0
  521. 5210 CLS
  522. 5220 PRINT "                                 Rename Files"
  523. 5230 'LABEL renamagn
  524. 5240 PRINT
  525. 5250 PRINT
  526. 5260 INPUT "Drive (Press Q to quit)";DRIVE$
  527. 5270 IF DRIVE$="q" OR DRIVE$="Q" THEN RETURN
  528. 5280 PRINT
  529. 5290 PRINT "Name of file to change (include path)?"
  530. 5300 INPUT "Q to quit. ",FILE1$
  531. 5310 IF FILE1$="q" OR FILE1$="Q" THEN RETURN
  532. 5320 PRINT
  533. 5330 PRINT "New name for "FILE1$" (Q to quit)";
  534. 5340 INPUT FILE2$
  535. 5350 IF FILE2$="q" OR FILE2$="Q" THEN RETURN
  536. 5360 'LABEL refile
  537. 5370 FILE1$=DRIVE$+"\"+FILE1$
  538. 5380 FILE2$=DRIVE$+"\"+FILE2$
  539. 5390 NAME FILE1$ AS FILE2$
  540. 5400 PRINT
  541. 5410 PRINT FILE1$" has been renamed "FILE2$
  542. 5420 PRINT
  543. 5430 INPUT "Rename another";RENAGN$
  544. 5440 IF RENAGN$="y" OR RENAGN$="Y" THEN 5230
  545. 5450 RETURN
  546. 5460 '
  547. 5470 'This is the end of the routine for renaming files.
  548. 5480 '
  549. 5490 '
  550. 5500 '
  551. 5510 'Here is the routine for displaying file contents.
  552. 5520 '
  553. 5530 'LABEL displafl
  554. 5540 ON ERROR GOTO 0
  555. 5550 CLS
  556. 5560 'LABEL displagn
  557. 5570 PRINT "                              View File Contents"
  558. 5580 PRINT
  559. 5590 PRINT
  560. 5600 PRINT "Which file (include drive and path)?"
  561. 5610 INPUT "Press Q and Enter to quit. ",WHATFILE$
  562. 5620 IF WHATFILE$="q" OR WHATFILE$="Q" THEN RETURN
  563. 5630 CLS
  564. 5640 PRINT "To pause, press Ctrl-Num Lock."
  565. 5650 PRINT
  566. 5660 PRINT "Special characters used in ";WHATFILE$
  567. 5670 PRINT "may not print in exactly the same manner as in the original."
  568. 5680 PRINT
  569. 5690 PRINT "Also, formatting may not be quite correct."
  570. 5700 'LABEL refiledf
  571. 5710 GOSUB 6630
  572. 5720 CLS
  573. 5730 OPEN WHATFILE$ FOR INPUT AS 1
  574. 5740 WHILE NOT EOF(1)
  575. 5750 LINE INPUT # 1, A$
  576. 5760 PRINT A$
  577. 5770 WEND
  578. 5780 CLOSE 1
  579. 5790 PRINT
  580. 5800 INPUT "Do you want to view more files";VIEWMORE$
  581. 5810 IF VIEWMORE$="y" OR VIEWMORE$="Y" THEN 5560
  582. 5820 RETURN
  583. 5830 '
  584. 5840 'This is the end of the routine for displaying files.
  585. 5850 '
  586. 5860 '
  587. 5870 '
  588. 5880 'Here is the routine for listing the devices for CONFIG.SYS
  589. 5890 '
  590. 5900 'Label LISTSYS
  591. 5910 ON ERROR GOTO 6690
  592. 5920 PRINT
  593. 5930 IF DRIVE$="a:\" THEN FILE$="a:\*.sys
  594. 5940 IF DRIVE$="A:\" THEN FILE$="a:\*.sys
  595. 5950 IF DRIVE$="b:\" THEN FILE$="b:\*.sys
  596. 5960 IF DRIVE$="B:\" THEN FILE$="b:\*.sys
  597. 5970 IF DRIVE$="c:\" THEN FILE$="c:\*.sys
  598. 5980 IF DRIVE$="C:\" THEN FILE$="c:\*.sys
  599. 5990 IF DRIVE$="d:\" THEN FILE$="d:\*.sys
  600. 6000 IF DRIVE$="D:\" THEN FILE$="D:\*.sys
  601. 6010 INPUT "Do you want a list of the system devices available (y/n)";SYSLIST$
  602. 6020 IF SYSLIST$="y" OR SYSLIST$="Y" THEN CLS:FILES FILE$:PRINT "(Don't count CONFIG.SYS as a system device)":PRINT:PRINT:ON ERROR GOTO 0:RETURN
  603. 6030 ON ERROR GOTO 0
  604. 6040 IF SYSLIST$="n" OR SYSLIST$="N" THEN RETURN
  605. 6050 PRINT "Please press either Y or N, then press Enter.":GOTO 5900
  606. 6060 '
  607. 6070 'This is the end of the routine for listing the devices for CONFIG.SYS
  608. 6080 '
  609. 6090 '
  610. 6100 '
  611. 6110 'Here is the routine for looking at the AUTOEXEC.BAT file.
  612. 6120 '
  613. 6130 'Label AUTOLOOK
  614. 6140 IF DRIVE$="a:\" THEN FILE$="a:\autoexec.bat
  615. 6150 CLS
  616. 6160 PRINT "Here is your file:"
  617. 6170 PRINT
  618. 6180 PRINT
  619. 6190 OPEN FILE$ FOR INPUT AS 1
  620. 6200 WHILE NOT EOF(1)
  621. 6210 LINE INPUT # 1, A$
  622. 6220 PRINT A$
  623. 6230 WEND
  624. 6240 GOSUB 6630
  625. 6250 CLOSE # 1
  626. 6260 RETURN
  627. 6270 IF DRIVE$="A:\" THEN FILE$="a:\autoexec.bat
  628. 6280 IF DRIVE$="b:\" THEN FILE$="b:\autoexec.bat
  629. 6290 IF DRIVE$="B:\" THEN FILE$="b:\autoexec.bat
  630. 6300 IF DRIVE$="c:\" THEN FILE$="c:\autoexec.bat
  631. 6310 IF DRIVE$="C:\" THEN FILE$="c:\autoexec.bat
  632. 6320 IF DRIVE$="d:\" THEN FILE$="d:\autoexec.bat
  633. 6330 IF DRIVE$="D:\" THEN FILE$="d:\autoexec.bat
  634. 6340 '
  635. 6350 'This is the end of the routine for looking at the AUTOEXEC.BAT file.
  636. 6360 '
  637. 6370 '
  638. 6380 '
  639. 6390 'Here is the routine for adding lines to the end of AUTOEXEC.BAT.
  640. 6400 '
  641. 6410 'Label APPNDAUT
  642. 6420 IF DRIVE$="a:\" THEN FILE$="a:\autoexec.bat
  643. 6430 IF DRIVE$="A:\" THEN FILE$="a:\autoexec.bat
  644. 6440 IF DRIVE$="b:\" THEN FILE$="b:\autoexec.bat
  645. 6450 IF DRIVE$="B:\" THEN FILE$="b:\autoexec.bat
  646. 6460 IF DRIVE$="c:\" THEN FILE$="c:\autoexec.bat
  647. 6470 IF DRIVE$="C:\" THEN FILE$="c:\autoexec.bat
  648. 6480 IF DRIVE$="d:\" THEN FILE$="d:\autoexec.bat
  649. 6490 IF DRIVE$="D:\" THEN FILE$="d:\autoexec.bat
  650. 6500 OPEN FILE$ FOR APPEND AS 1
  651. 6510 'Label APPNDAGN
  652. 6520 PRINT
  653. 6530 INPUT "Line to add (Q to quit)";APPENDLN$
  654. 6540 IF APPENDLN$="q" OR APPENDLN$="Q" THEN CLOSE # 1:RETURN
  655. 6550 PRINT# 1, APPENDLN$
  656. 6560 GOTO 6510
  657. 6570 '
  658. 6580 'This is the end of the routine for adding to the end of AUTOEXEC.BAT.
  659. 6590 '
  660. 6600 '
  661. 6610 '
  662. 6620 'Here is the routine for continuing when the user is ready.
  663. 6630 'LABEL continue
  664. 6640 PRINT
  665. 6650 PRINT
  666. 6660 PRINT "Press any key to continue. ";
  667. 6670 IF INKEY$="" THEN 6670
  668. 6680 RETURN
  669. 6690 IF ERR=53 THEN PRINT "No system drivers available.":RESUME NEXT
  670. 
  671.