home *** CD-ROM | disk | FTP | other *** search
- 10 'Label START
- 20 'Set up and print intro screen.
- 30 '
- 40 KEY OFF
- 50 CLS
- 60 PRINT " The GWBASIC 3.22 File Manager, Version 1.07"
- 70 PRINT
- 80 PRINT
- 90 PRINT " By Matt Roberts
- 100 PRINT " 3 Cedar St., # 8
- 110 PRINT " Montpelier, Vt 05602-3006
- 120 PRINT " (802)223-2553
- 130 PRINT
- 140 PRINT
- 150 PRINT "If you find the files on this disk useful, a donation of $5.00 would
- 160 PRINT "be greatly appreciated. Thanks.
- 170 PRINT
- 180 PRINT
- 190 PRINT
- 200 PRINT "If you have trouble running this program, and the documentation doesn't
- 210 PRINT "seem to help, you can call me between 9AM and 9PM EST, and I'll try to
- 220 PRINT "help.
- 230 PRINT
- 240 PRINT
- 250 PRINT
- 260 PRINT
- 270 'Wait for user to press a key; then continue.
- 280 GOSUB 7800
- 290 GOTO 430
- 300 'Label QUITPROG
- 310 '
- 320 'Here is the routine for leaving the program.
- 330 CLS
- 340 KEY ON
- 350 END
- 360 '
- 370 'Intro screen is now set up and printed.
- 380 '
- 390 '
- 400 'Now direct the program to create a menu of options.
- 410 '
- 420 'Here is the menu of options.
- 430 'Label MENU
- 440 CLS
- 450 ON ERROR GOTO 0
- 460 PRINT " Your Options
- 470 PRINT
- 480 PRINT
- 490 PRINT "1- List files. 10- Length of File."
- 500 PRINT
- 510 PRINT "2- Work with CONFIG.SYS file. 11- Move a file."
- 520 PRINT
- 530 PRINT "3- Work with the AUTOEXEC.BAT file. 12- Quit the Program."
- 540 PRINT
- 550 PRINT "4- Delete Files.
- 560 PRINT
- 570 PRINT "5- Make Directory.
- 580 PRINT
- 590 PRINT "6- Remove Directory."
- 600 PRINT
- 610 PRINT "7- Rename Files."
- 620 PRINT
- 630 PRINT "8- Display File Contents."
- 640 PRINT
- 650 PRINT "9- Copy a File."
- 660 PRINT
- 670 PRINT
- 680 INPUT "Please press the key corresponding to your choice; then press Enter. ",CHOICE
- 690 ON CHOICE GOSUB 770,970,2650,3730,4140,4420,5190,5530,5890,6340,6590,300
- 700 GOTO 430
- 710 '
- 720 'This is the end of the menu.
- 730 '
- 740 '
- 750 '
- 760 'Here is the routine for looking at available files.
- 770 'Label SEEFILES
- 780 ON ERROR GOTO 0
- 790 'Label SEEFLAGN
- 800 CLS
- 810 PRINT " View Your Files
- 820 PRINT
- 830 PRINT
- 840 INPUT "Which directory";DIRECTORY$
- 850 FILES DIRECTORY$
- 860 'Label SKIP
- 870 PRINT
- 880 PRINT
- 890 INPUT "Would you like to view more files (y/n)";VIEWMORE$
- 900 IF VIEWMORE$="y" OR VIEWMORE$="Y" THEN 790 ELSE RETURN
- 910 '
- 920 'This is the end of the routine for looking at available files.
- 930 '
- 940 '
- 950 '
- 960 'Here is the routine for working with the CONFIG.SYS file.
- 970 'Label CHANGECON
- 980 ON ERROR GOTO 0
- 990 CLS
- 1000 PRINT " View or Change Your CONFIG.SYS File
- 1010 PRINT
- 1020 PRINT
- 1030 INPUT "On which drive is your CONFIG.SYS file";DRIVE$
- 1040 DRIVE$=DRIVE$+"\"
- 1050 'Label REDRIVE
- 1060 'Label CONFMENU
- 1070 CLS
- 1080 PRINT "You have the following options:
- 1090 PRINT
- 1100 PRINT
- 1110 PRINT "1- Just view the CONFIG.SYS file."
- 1120 PRINT
- 1130 PRINT "2- Add lines to the end of your file.
- 1140 PRINT
- 1150 PRINT "3- Create a new CONFIG.SYS file."
- 1160 PRINT
- 1170 PRINT "4- Return to the options menu.
- 1180 PRINT
- 1190 PRINT
- 1200 PRINT
- 1210 INPUT "Please press the number corresponding to your choice, and then press Enter. ",CHNGVIEW$
- 1220 IF CHNGVIEW$="1" THEN GOSUB 2190:GOTO 1060
- 1230 IF CHNGVIEW$="2" THEN GOSUB 2410:GOSUB 2190:GOTO 1060
- 1240 IF CHNGVIEW$="3" THEN 1320:GOTO 1060
- 1250 IF CHNGVIEW$="4" THEN RETURN
- 1260 GOTO 1060
- 1270 '
- 1280 '
- 1290 '
- 1300 'This section creates a new CONFIG.SYS file.
- 1310 '
- 1320 'Label NEWFILEC
- 1330 CLS
- 1340 IF DRIVE$="a:\" THEN FILE1$="a:\config.sys
- 1350 IF DRIVE$="A:\" THEN FILE1$="A:\CONFIG.SYS
- 1360 IF DRIVE$="b:\" THEN FILE1$="b:\config.sys
- 1370 IF DRIVE$="B:\" THEN FILE1$="B:\CONFIG.SYS
- 1380 IF DRIVE$="c:\" THEN FILE1$="c:\config.sys
- 1390 IF DRIVE$="C:\" THEN FILE1$="C:\CONFIG.SYS
- 1400 IF DRIVE$="d:\" THEN FILE1$="d:\config.sys
- 1410 IF DRIVE$="D:\" THEN FILE1$="D:\CONFIG.SYS
- 1420 IF DRIVE$="a:\" THEN FILE2$="a:\config.bas
- 1430 IF DRIVE$="A:\" THEN FILE2$="A:\CONFIG.BAS
- 1440 IF DRIVE$="b:\" THEN FILE2$="b:\config.bas
- 1450 IF DRIVE$="B:\" THEN FILE2$="B:\CONFIG.BAS
- 1460 IF DRIVE$="c:\" THEN FILE2$="c:\config.bas
- 1470 IF DRIVE$="C:\" THEN FILE2$="C:\CONFIG.BAS
- 1480 IF DRIVE$="d:\" THEN FILE2$="d:\config.bas
- 1490 IF DRIVE$="D:\" THEN FILE2$="D:\CONFIG.BAS
- 1500 NAME FILE1$ AS FILE2$
- 1510 PRINT
- 1520 PRINT
- 1530 PRINT "Your CONFIG.SYS file has been changed to CONFIG.BAS in order to save
- 1540 PRINT "it for future use. To use it later it will have to be renamed to
- 1550 PRINT "CONFIG.SYS, after the current CONFIG.SYS has been renamed to
- 1560 PRINT "something else (for example, CONFIG.X)."
- 1570 PRINT
- 1580 PRINT
- 1590 PRINT
- 1600 GOSUB 7810
- 1610 'Label CHANGEAGN
- 1620 CLS
- 1630 OPEN FILE1$ FOR OUTPUT AS 1
- 1640 PRINT "How many files do you want (if you're not sure, type 20)?
- 1650 INPUT "To quit, press Q and Enter. ",FILENUMB$
- 1660 IF FILENUMB$="q" OR FILENUMB$="Q" THEN 2050
- 1670 PRINT# 1, "files=";FILENUMB$
- 1680 PRINT
- 1690 PRINT
- 1700 PRINT
- 1710 INPUT "How many buffers do you want (if you're not sure, type 5)";BUFFER$
- 1720 PRINT# 1, "buffers=";BUFFER$
- 1730 GOSUB 7080
- 1740 'Label DEVCAGAIN
- 1750 PRINT
- 1760 INPUT "Which device would you like to include (N for none)";DEVICE$
- 1770 IF DEVICE$="n" OR DEVICE$="N" THEN 1820
- 1780 PRINT# 1, "devices=";DEVICE$
- 1790 PRINT
- 1800 INPUT "Would you like to include more devices";INCLDMORE$
- 1810 IF INCLDMORE$="y" OR INCLDMORE$="Y" THEN 1740
- 1820 'Label NODEVICE
- 1830 PRINT
- 1840 INPUT "Do you want BREAK on or off (if not sure, type OFF)";BREAKYN$
- 1850 IF BREAKYN$="on" OR BREAKYN$="ON" THEN PRINT# 1, "BREAK=ON"
- 1860 CLOSE 1
- 1870 GOSUB 2190
- 1880 PRINT
- 1890 PRINT
- 1900 PRINT
- 1910 PRINT "If this is not O.K. AND you want to go back and change the file, press C and Enter."
- 1920 PRINT
- 1930 PRINT "To restore your original CONFIG.SYS file, press R and Enter."
- 1940 PRINT
- 1950 INPUT "If you're happy with it as is, type OK and Enter. ",CHANGE$
- 1960 'Label OKDECIDE
- 1970 IF CHANGE$="c" OR CHANGE$="C" THEN 1610
- 1980 IF CHANGE$="r" OR CHANGE$="R" THEN 2050
- 1990 IF CHANGE$="ok" OR CHANGE$="OK" THEN 1060
- 2000 PRINT
- 2010 INPUT "You must choose between C, R, or OK. ",CHANGE$
- 2020 GOTO 1960
- 2030 '
- 2040 '
- 2050 'Label RESTOREC
- 2060 CLS
- 2070 CLOSE 1
- 2080 KILL FILE1$
- 2090 NAME FILE2$ AS FILE1$
- 2100 PRINT "Your original CONFIG.SYS file has been restored.
- 2110 GOSUB 7810
- 2120 GOTO 1060
- 2130 '
- 2140 'This is the end of the routine for working with the CONFIG.SYS file.
- 2150 '
- 2160 '
- 2170 '
- 2180 'Here is the routine for looking at the CONFIG.SYS file.
- 2190 'Label SEESYS
- 2200 IF DRIVE$="a:\" THEN FILE$="a:\config.sys"
- 2210 IF DRIVE$="b:\" THEN FILE$="b:\config.sys"
- 2220 IF DRIVE$="c:\" THEN FILE$="c:\config.sys"
- 2230 IF DRIVE$="d:\" THEN FILE$="d:\config.sys"
- 2240 CLS
- 2250 PRINT "Here is your file:"
- 2260 PRINT
- 2270 OPEN FILE$ FOR INPUT AS 1
- 2280 WHILE NOT EOF(1)
- 2290 LINE INPUT#1, A$
- 2300 PRINT A$
- 2310 WEND:CLOSE
- 2320 GOSUB 7810
- 2330 RETURN
- 2340 '
- 2350 'This is the end of the routine for looking at the CONFIG.SYS file.
- 2360 '
- 2370 '
- 2380 '
- 2390 'Here is the routine for adding lines to the end of CONFIG.SYS
- 2400 '
- 2410 'Label APPENDLN
- 2420 IF DRIVE$="a:\" THEN FILE$="a:\config.sys
- 2430 IF DRIVE$="A:\" THEN FILE$="a:\config.sys
- 2440 IF DRIVE$="b:\" THEN FILE$="b:\config.sys
- 2450 IF DRIVE$="B:\" THEN FILE$="b:\config.sys
- 2460 IF DRIVE$="c:\" THEN FILE$="c:\config.sys
- 2470 IF DRIVE$="C:\" THEN FILE$="c:\config.sys
- 2480 IF DRIVE$="d:\" THEN FILE$="d:\config.sys
- 2490 IF DRIVE$="D:\" THEN FILE$="d:\config.sys
- 2500 OPEN FILE$ FOR APPEND AS 1
- 2510 GOSUB 7080
- 2520 'Label APPENDAGN
- 2530 PRINT
- 2540 INPUT "Line to add (Q to quit)";APPENDLN$
- 2550 IF APPENDLN$="q" OR APPENDLN$="Q" THEN CLOSE 1:RETURN
- 2560 PRINT# 1, APPENDLN$
- 2570 GOTO 2520
- 2580 '
- 2590 'This is the end of the routine for adding lines to CONFIG.SYS
- 2600 '
- 2610 '
- 2620 '
- 2630 'Here is the routine for working with the AUTOEXEC.BAT file.
- 2640 '
- 2650 'Label CHNGAUTO
- 2660 ON ERROR GOTO 0
- 2670 CLS
- 2680 PRINT " View or Change Your AUTOEXEC.BAT file.
- 2690 PRINT
- 2700 PRINT
- 2710 INPUT "On which drive is your AUTOEXEC.BAT file";DRIVE$
- 2720 DRIVE$=DRIVE$+"\"
- 2730 'Label REDRIVEA
- 2740 'Label AUTOMENU
- 2750 CLS
- 2760 PRINT "You have the following options:"
- 2770 PRINT
- 2780 PRINT
- 2790 PRINT "1- Just view the AUTOEXEC.BAT file."
- 2800 PRINT
- 2810 PRINT "2- Add lines to the end of your file."
- 2820 PRINT
- 2830 PRINT "3- Create a new AUTOEXEC.BAT file."
- 2840 PRINT
- 2850 PRINT "4- Return to the Main Options Menu."
- 2860 PRINT
- 2870 PRINT
- 2880 PRINT
- 2890 INPUT "Please press the number corresponding to your choice, and then press Enter. ",CHNGAUTO$
- 2900 IF CHNGAUTO$="1" THEN CLS:GOSUB 7310:GOTO 2740
- 2910 IF CHNGAUTO$="2" THEN CLS:GOSUB 7590:GOSUB 7310:GOTO 2740
- 2920 IF CHNGAUTO$="3" THEN CLS:GOTO 3000
- 2930 IF CHNGAUTO$="4" THEN CLS:RETURN
- 2940 GOTO 2740
- 2950 '
- 2960 '
- 2970 '
- 2980 'This routine creates a new AUTOEXEC.BAT file.
- 2990 '
- 3000 'Label NEWAUTO
- 3010 IF DRIVE$="a:\" THEN FILE1$="a:\autoexec.bat
- 3020 IF DRIVE$="A:\" THEN FILE1$="a:\autoexec.bat
- 3030 IF DRIVE$="b:\" THEN FILE1$="b:\autoexec.bat
- 3040 IF DRIVE$="B:\" THEN FILE1$="b:\autoexec.bat
- 3050 IF DRIVE$="c:\" THEN FILE1$="c:\autoexec.bat
- 3060 IF DRIVE$="C:\" THEN FILE1$="C:\autoexec.bat
- 3070 IF DRIVE$="d:\" THEN FILE1$="d:\autoexec.bat
- 3080 IF DRIVE$="D:\" THEN FILE1$="d:\autoexec.bat
- 3090 IF DRIVE$="a:\" THEN FILE2$="a:\autoexec.bas
- 3100 IF DRIVE$="A:\" THEN FILE2$="a:\autoexec.bas
- 3110 IF DRIVE$="b:\" THEN FILE2$="b:\autoexec.bas
- 3120 IF DRIVE$="B:\" THEN FILE2$="b:\autoexec.bas
- 3130 IF DRIVE$="c:\" THEN FILE2$="c:\autoexec.bas
- 3140 IF DRIVE$="C:\" THEN FILE2$="c:\autoexec.bas
- 3150 IF DRIVE$="d:\" THEN FILE2$="d:\autoexec.bas
- 3160 IF DRIVE$="D:\" THEN FILE2$="d:\autoexec.bas
- 3170 NAME FILE1$ AS FILE2$
- 3180 CLS
- 3190 PRINT "Your AUTOEXEC.BAT file has been changed to AUTOEXEC.BAS in order to
- 3200 PRINT "save it for later use. To use it later, you will have to rename it
- 3210 PRINT "AUTOEXEC.BAT after renaming the current AUTOEXEC.BAT to something else
- 3220 PRINT "(for example, AUTOEXEC.X)."
- 3230 PRINT
- 3240 PRINT
- 3250 GOSUB 7810
- 3260 'Label SCNDCHNG
- 3270 CLS
- 3280 OPEN FILE1$ FOR OUTPUT AS 1
- 3290 PRINT "Please type the first line you want, then press Enter (Q to quit).
- 3300 PRINT
- 3310 INPUT "> ",FIRSTLN$
- 3320 IF FIRSTLN$="q" OR FIRSTLN$="Q" THEN GOTO 3600
- 3330 PRINT# 1, FIRSTLN$
- 3340 'Label CONTLINE
- 3350 PRINT
- 3360 PRINT "Please type your next line, followed by Enter (Q to quit).
- 3370 PRINT
- 3380 INPUT "> ",NEXTLINE$
- 3390 IF NEXTLINE$="q" OR NEXTLINE$="Q" THEN GOTO 3420
- 3400 PRINT# 1,NEXTLINE$
- 3410 GOTO 3340
- 3420 'Label STOPCHNG
- 3430 CLOSE # 1
- 3440 CLS
- 3450 GOSUB 7310
- 3460 PRINT
- 3470 PRINT
- 3480 PRINT
- 3490 PRINT "If this is not O.K. AND you want to change it, press C and then Enter.
- 3500 PRINT
- 3510 PRINT "To restore your original AUTOEXEC.BAT, press R and then Enter.
- 3520 PRINT
- 3530 INPUT "If you're happy with it as is, type OK and Enter. ",CHANGEYN$
- 3540 'Label RECHANGE
- 3550 IF CHANGEYN$="c" OR CHANGEYN$="C" THEN GOTO 3260
- 3560 IF CHANGEYN$="r" OR CHANGEYN$="R" THEN GOTO 3600
- 3570 IF CHANGEYN$="ok" OR CHANGEYN$="OK" THEN GOTO 2740
- 3580 PRINT
- 3590 INPUT "You must choose C, R, or OK. ",CHANGEYN$:GOTO 3540
- 3600 'Label NOCHANGE
- 3610 CLS
- 3620 CLOSE # 1
- 3630 KILL FILE1$
- 3640 NAME FILE2$ AS FILE1$
- 3650 PRINT "Your original AUTOEXEC.BAT file has been restored.":GOSUB 7810:GOTO 2740
- 3660 '
- 3670 'This is the end of the routine for working with the AUTOEXEC.BAT file.
- 3680 '
- 3690 '
- 3700 '
- 3710 ' Here is the routine for deleting files.
- 3720 '
- 3730 'LABEL killfile
- 3740 ON ERROR GOTO 0
- 3750 CLS
- 3760 PRINT " Delete Files
- 3770 PRINT
- 3780 PRINT
- 3790 PRINT "Before going any further, you should be aware that, once a file has
- 3800 PRINT "been deleted, it is very difficult to retrieve it. From this program,
- 3810 PRINT "it is impossible; there is no undelete option available.
- 3820 PRINT
- 3830 'LABEL deletagn
- 3840 INPUT "Press Enter to continue, or Q and Enter to quit. ",CONTYN$
- 3850 IF CONTYN$="q" OR CONTYN$="Q" THEN RETURN
- 3860 CLS
- 3870 PRINT " Delete Files
- 3880 PRINT
- 3890 PRINT
- 3900 INPUT "File to delete (include drive and path)";FILE$
- 3910 PRINT
- 3920 PRINT
- 3930 PRINT "All the data in "FILE$;" will be destroyed.
- 3940 PRINT
- 3950 PRINT
- 3960 INPUT "Press Enter to continue or Q and Enter to quit. ",CONTYN$
- 3970 IF CONTYN$="q" OR CONTYN$="Q" THEN RETURN
- 3980 KILL FILE$
- 3990 PRINT
- 4000 PRINT
- 4010 PRINT FILE$" has been deleted.
- 4020 PRINT
- 4030 INPUT "Delete another";DELAGAIN$
- 4040 IF DELAGAIN$="y" OR DELAGAIN$="Y" THEN 3830
- 4050 PRINT
- 4060 RETURN
- 4070 '
- 4080 ' This is the end of the routine for deleting files.
- 4090 '
- 4100 '
- 4110 '
- 4120 ' Here is the routine for making a directory.
- 4130 '
- 4140 'LABEL makedir
- 4150 'on error goto 0
- 4160 CLS
- 4170 PRINT " Make a Directory"
- 4180 PRINT
- 4190 PRINT
- 4200 ' LABEL makeagn
- 4210 INPUT "Directory name (include drive and path) ",DIRECTORY$
- 4220 MKDIR DIRECTORY$
- 4230 PRINT
- 4240 PRINT
- 4250 PRINT "You have created directory: "DIRECTORY$
- 4260 PRINT
- 4270 PRINT
- 4280 INPUT "Would you like to make another directory";MAKEAGN$
- 4290 IF MAKEAGN$="y" OR MAKEAGN$="Y" THEN PRINT
- 4300 IF MAKEAGN$="y" OR MAKEAGN$="Y" THEN PRINT
- 4310 IF MAKEAGN$="y" OR MAKEAGN$="Y" THEN 4200
- 4320 IF MAKEAGN$="n" OR MAKEAGN$="N" THEN RETURN
- 4330 CLS
- 4340 GOTO 4280
- 4350 '
- 4360 ' This is the end of the routine for making directories.
- 4370 '
- 4380 '
- 4390 '
- 4400 'Here is the routine for removing directories.
- 4410 '
- 4420 'LABEL removdir
- 4430 ON ERROR GOTO 0
- 4440 CLS
- 4450 PRINT " Remove a Directory"
- 4460 PRINT
- 4470 PRINT
- 4480 PRINT "Before you can remove a directory, you must remove all files in that"
- 4490 PRINT "directory, and its subdirectories. You must then remove all subdirectories."
- 4500 PRINT
- 4510 PRINT
- 4520 'LABEL removagn
- 4530 INPUT "Which drive (Q and Enter to quit)";DRIVE$
- 4540 IF DRIVE$="q" OR DRIVE$="Q" THEN RETURN
- 4550 PRINT
- 4560 INPUT "Directory name (include path) or Q to quit";DIRECTORY$
- 4570 'LABEL redir
- 4580 IF DIRECTORY$="q" OR DIRECTORY$="Q" THEN RETURN
- 4590 DIRECTORY$=DRIVE$+"\"+DIRECTORY$
- 4600 CLS
- 4610 PRINT "Here are the contents of "DIRECTORY$":"
- 4620 FILES DIRECTORY$+"\"
- 4630 PRINT "If this directory is not empty, you will have to delete any files and"
- 4640 PRINT "remove any subdirectories before you can remove it."
- 4650 PRINT
- 4660 PRINT
- 4670 'LABEL rdoptions
- 4680 PRINT "Here are your options:"
- 4690 PRINT
- 4700 PRINT "1- Delete directory files."
- 4710 PRINT
- 4720 PRINT "2- Remove subdirectories."
- 4730 PRINT
- 4740 PRINT "3- Continue."
- 4750 PRINT
- 4760 PRINT "4- Return to the Main Options Menu."
- 4770 PRINT
- 4780 INPUT "Please press the number corresponding to your choice, and then press Enter: ",DOWHAT$
- 4790 IF DOWHAT$="1" THEN CLS:GOTO 4930
- 4800 IF DOWHAT$="2" THEN CLS:GOTO 4520
- 4810 IF DOWHAT$="3" THEN CLS:GOTO 4830
- 4820 IF DOWHAT$="4" THEN CLS:RETURN
- 4830 'LABEL rmdrcont
- 4840 RMDIR DIRECTORY$
- 4850 PRINT
- 4860 PRINT
- 4870 PRINT "You have removed directory: "DIRECTORY$
- 4880 PRINT
- 4890 PRINT
- 4900 INPUT "Would you like to remove another directory";RMDAGAIN$
- 4910 IF RMDAGAIN$="y" OR RMDAGAIN$="Y" THEN 4520
- 4920 RETURN
- 4930 'LABEL deldirfl
- 4940 CLS
- 4950 PRINT "Here are the files in "DIRECTORY$":"
- 4960 PRINT
- 4970 PRINT
- 4980 FILES DIRECTORY$+"\"
- 4990 PRINT
- 5000 PRINT
- 5010 INPUT "Which file (include path, Q to quit)";WHICHFIL$
- 5020 IF WHICHFIL$="q" OR WHICHFIL$="Q" THEN CLS:FILES DIRECTORY$+"\":PRINT:PRINT:PRINT:PRINT:PRINT:GOTO 4670
- 5030 WHICHFIL$=DRIVE$+"\"+WHICHFIL$
- 5040 KILL WHICHFIL$
- 5050 PRINT
- 5060 PRINT
- 5070 PRINT WHICHFIL$" has been deleted."
- 5080 PRINT
- 5090 INPUT "Delete another";ANOTHER$
- 5100 IF ANOTHER$="y" OR ANOTHER$="Y" THEN 4930
- 5110 CLS:FILES DIRECTORY$+"\":PRINT:PRINT:PRINT:PRINT:PRINT:GOTO 4670
- 5120 '
- 5130 'This is the end of the routine for removing directories.
- 5140 '
- 5150 '
- 5160 '
- 5170 'Here is the routine for renaming files.
- 5180 '
- 5190 'LABEL renfile
- 5200 ON ERROR GOTO 0
- 5210 CLS
- 5220 PRINT " Rename Files"
- 5230 'LABEL renamagn
- 5240 PRINT
- 5250 PRINT
- 5260 INPUT "Drive (Press Q to quit)";DRIVE$
- 5270 IF DRIVE$="q" OR DRIVE$="Q" THEN RETURN
- 5280 PRINT
- 5290 PRINT "Name of file to change (include path)?"
- 5300 INPUT "Q to quit. ",FILE1$
- 5310 IF FILE1$="q" OR FILE1$="Q" THEN RETURN
- 5320 PRINT
- 5330 PRINT "New name for "FILE1$" (Q to quit)";
- 5340 INPUT FILE2$
- 5350 IF FILE2$="q" OR FILE2$="Q" THEN RETURN
- 5360 'LABEL refile
- 5370 FILE1$=DRIVE$+"\"+FILE1$
- 5380 FILE2$=DRIVE$+"\"+FILE2$
- 5390 NAME FILE1$ AS FILE2$
- 5400 PRINT
- 5410 PRINT FILE1$" has been renamed "FILE2$
- 5420 PRINT
- 5430 INPUT "Rename another";RENAGN$
- 5440 IF RENAGN$="y" OR RENAGN$="Y" THEN 5230
- 5450 RETURN
- 5460 '
- 5470 'This is the end of the routine for renaming files.
- 5480 '
- 5490 '
- 5500 '
- 5510 'Here is the routine for displaying file contents.
- 5520 '
- 5530 'LABEL displafl
- 5540 ON ERROR GOTO 0
- 5550 CLS
- 5560 'LABEL displagn
- 5570 PRINT " View File Contents"
- 5580 PRINT
- 5590 PRINT
- 5600 PRINT "Which file (include drive and path)?"
- 5610 INPUT "Press Q and Enter to quit. ",WHATFILE$
- 5620 IF WHATFILE$="q" OR WHATFILE$="Q" THEN RETURN
- 5630 CLS
- 5640 PRINT "To pause, press Ctrl-Num Lock."
- 5650 PRINT
- 5660 PRINT "Special characters used in ";WHATFILE$
- 5670 PRINT "may not print in exactly the same manner as in the original."
- 5680 PRINT
- 5690 PRINT "Also, formatting may not be quite correct."
- 5700 'LABEL refiledf
- 5710 GOSUB 7810
- 5720 CLS
- 5730 OPEN WHATFILE$ FOR INPUT AS 1
- 5740 WHILE NOT EOF(1)
- 5750 LINE INPUT # 1, A$
- 5760 PRINT A$
- 5770 WEND
- 5780 CLOSE 1
- 5790 PRINT
- 5800 INPUT "Do you want to view more files";VIEWMORE$
- 5810 IF VIEWMORE$="y" OR VIEWMORE$="Y" THEN 5560
- 5820 RETURN
- 5830 '
- 5840 'This is the end of the routine for displaying files.
- 5850 '
- 5860 '
- 5870 '
- 5880 'Here is the routine for copying text files.
- 5890 'LABEL copyfile
- 5900 ON ERROR GOTO 0
- 5910 'LABEL redo
- 5920 CLS
- 5930 PRINT " Copy File"
- 5940 PRINT
- 5950 PRINT
- 5960 PRINT "*****PLEASE NOTE***** .EXE and .COM files will not copy properly. While"
- 5970 PRINT "other files have not yet been tested, it is probably safe to assume that"
- 5980 PRINT "any file that contains special characters may not copy properly. As"
- 5990 PRINT "far as I know, the original is not affected, but I'm making no guarantees"
- 6000 PRINT "on that score either. Please use backups for any testing, until you"
- 6010 PRINT "are confident things will go smoothly."
- 6020 GOSUB 7810
- 6030 CLS
- 6040 PRINT "Text file to copy (include drive and path)?"
- 6050 INPUT "Press Q and Enter to quit. ",SOURCEFL$
- 6060 'LABEL resource
- 6070 IF SOURCEFL$="q" OR SOURCEFL$="Q" THEN RETURN
- 6080 OPEN SOURCEFL$ FOR INPUT AS 1
- 6090 PRINT
- 6100 PRINT "Destination (include drive and path)?"
- 6110 INPUT "Press Q and Enter to quit. ",DESTINY$
- 6120 IF DESTINY$="q" OR DESTINY$="Q" THEN CLOSE 1:RETURN
- 6130 'LABEL goahead
- 6140 OPEN DESTINY$ FOR OUTPUT AS 2
- 6150 WHILE NOT EOF(1)
- 6160 LINE INPUT # 1, A$
- 6170 PRINT # 2, A$
- 6180 WEND
- 6190 CLOSE 1
- 6200 CLOSE 2
- 6210 PRINT
- 6220 PRINT
- 6230 PRINT SOURCEFL$" has been copied to "DESTINY$"."
- 6240 GOSUB 7810
- 6250 RETURN
- 6260 '
- 6270 '
- 6280 'This is the end of the routine for copying a file.
- 6290 '
- 6300 '
- 6310 '
- 6320 'Here is the routine for getting the length of a file.
- 6330 '
- 6340 ' LABEL filength
- 6350 ON ERROR GOTO 0
- 6360 CLS
- 6370 PRINT " Get File Length"
- 6380 PRINT
- 6390 PRINT
- 6400 'LABEL lngthagn
- 6410 PRINT "File name (include drive and path)?
- 6420 INPUT "Press Q and Enter to quit. ",FILENAME$
- 6430 'LABEL relength
- 6440 IF FILENAME$="q" OR FILENAME$="Q" THEN RETURN
- 6450 OPEN FILENAME$ FOR INPUT AS 1
- 6460 PRINT
- 6470 PRINT FILENAME$" contains "LOF(1)" bytes."
- 6480 CLOSE 1
- 6490 PRINT
- 6500 INPUT "Check another file";ANOTHER$
- 6510 IF ANOTHER$="y" OR ANOTHER$="Y" THEN 6400 ELSE RETURN
- 6520 '
- 6530 'This is the end of the routine for getting the length of a file.
- 6540 '
- 6550 '
- 6560 '
- 6570 'Here is the routine for moving files.
- 6580 '
- 6590 'LABEL movefile
- 6600 ON ERROR GOTO 0
- 6610 CLS
- 6620 PRINT " Move File"
- 6630 'LABEL remove
- 6640 PRINT "*****WARNING***** THIS IS A DESTRUCTIVE OPTION. THAT IS TO SAY, YOUR"
- 6650 PRINT "ORIGINAL COPY WILL BE DESTROYED IN THE NORMAL OPERATION OF THIS"
- 6660 PRINT "OPTION. .EXE AND .COM FILES ARE AMONG THOSE THAT WILL NOT MOVE"
- 6670 PRINT "CORRECTLY. THERE ARE PROBABLY OTHERS. PLEASE USE BACKUP FILES"
- 6680 PRINT "EXPERIMENTING, UNTIL YOU ARE CERTAIN THAT THINGS WILL GO AS"
- 6690 PRINT "PLANNED. AGAIN, DO NOT TRY TO MOVE .COM OR .EXE FILES USING THIS"
- 6700 PRINT "OPTION."
- 6710 PRINT
- 6720 PRINT
- 6730 'LABEL moveagn
- 6740 INPUT "To quit, press Q; then press Enter. To continue, just press Enter. ",QUITYN$
- 6750 IF QUITYN$="q" OR QUITYN$="Q" THEN RETURN
- 6760 CLS
- 6770 PRINT "Please type the path where the file you want to move can be found. Don't"
- 6780 PRINT "include the name of the file yet. If you want to quit, press Q; then press"
- 6790 INPUT "Enter. ",PATH$
- 6800 IF PATH$="q" OR PATH$="Q" THEN RETURN
- 6810 PRINT
- 6820 INPUT "Please enter the filename. To quit, press Q and Enter. ",FILENAME$
- 6830 IF FILENAME$="q" OR FILENAME$="Q" THEN RETURN
- 6840 WHOLENAM$=PATH$+"\"+FILENAME$
- 6850 PRINT
- 6860 PRINT "Please type the new location for ";WHOLENAM$"."
- 6870 PRINT "Again, don't type the name of the file. The old filename will be used."
- 6880 INPUT "To quit, press Q and Enter. ",NEWPLACE$
- 6890 IF NEWPLACE$="q" OR NEWPLACE$="Q" THEN RETURN
- 6900 'LABEL rewhole
- 6910 NEWFILE$=NEWPLACE$+"\"+FILENAME$
- 6920 'Error routine for existing file with same name will go here when I do it
- 6930 'LABEL moveon
- 6940 OPEN WHOLENAM$ FOR INPUT AS 1
- 6950 'LABEL renew
- 6960 OPEN NEWFILE$ FOR OUTPUT AS 2
- 6970 WHILE NOT EOF(1)
- 6980 LINE INPUT # 1, A$
- 6990 PRINT # 2, A$
- 7000 WEND
- 7010 CLOSE
- 7020 KILL WHOLENAM$
- 7030 PRINT
- 7040 PRINT
- 7050 PRINT WHOLENAM$" has been moved to "NEWFILE$
- 7051 input "Move another";moveagn$
- 7052 if moveagn$="y" or moveagn$="Y" then 6730
- 7053 gosub 7810
- 7054 return
- 7055 '
- 7056 '
- 7057 'This is the end of the routine for moving files.
- 7058 '
- 7059 '
- 7060 'Here is the routine for listing the devices for CONFIG.SYS
- 7070 '
- 7080 'Label LISTSYS
- 7090 ON ERROR GOTO 7870
- 7100 PRINT
- 7110 IF DRIVE$="a:\" THEN FILE$="a:\*.sys
- 7120 IF DRIVE$="A:\" THEN FILE$="a:\*.sys
- 7130 IF DRIVE$="b:\" THEN FILE$="b:\*.sys
- 7140 IF DRIVE$="B:\" THEN FILE$="b:\*.sys
- 7150 IF DRIVE$="c:\" THEN FILE$="c:\*.sys
- 7160 IF DRIVE$="C:\" THEN FILE$="c:\*.sys
- 7170 IF DRIVE$="d:\" THEN FILE$="d:\*.sys
- 7180 IF DRIVE$="D:\" THEN FILE$="D:\*.sys
- 7190 INPUT "Do you want a list of the system devices available (y/n)";SYSLIST$
- 7200 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
- 7210 ON ERROR GOTO 0
- 7220 IF SYSLIST$="n" OR SYSLIST$="N" THEN RETURN
- 7230 PRINT "Please press either Y or N, then press Enter.":GOTO 7080
- 7240 '
- 7250 'This is the end of the routine for listing the devices for CONFIG.SYS
- 7260 '
- 7270 '
- 7280 '
- 7290 'Here is the routine for looking at the AUTOEXEC.BAT file.
- 7300 '
- 7310 'Label AUTOLOOK
- 7320 IF DRIVE$="a:\" THEN FILE$="a:\autoexec.bat
- 7330 CLS
- 7340 PRINT "Here is your file:"
- 7350 PRINT
- 7360 PRINT
- 7370 OPEN FILE$ FOR INPUT AS 1
- 7380 WHILE NOT EOF(1)
- 7390 LINE INPUT # 1, A$
- 7400 PRINT A$
- 7410 WEND
- 7420 GOSUB 7810
- 7430 CLOSE # 1
- 7440 RETURN
- 7450 IF DRIVE$="A:\" THEN FILE$="a:\autoexec.bat
- 7460 IF DRIVE$="b:\" THEN FILE$="b:\autoexec.bat
- 7470 IF DRIVE$="B:\" THEN FILE$="b:\autoexec.bat
- 7480 IF DRIVE$="c:\" THEN FILE$="c:\autoexec.bat
- 7490 IF DRIVE$="C:\" THEN FILE$="c:\autoexec.bat
- 7500 IF DRIVE$="d:\" THEN FILE$="d:\autoexec.bat
- 7510 IF DRIVE$="D:\" THEN FILE$="d:\autoexec.bat
- 7520 '
- 7530 'This is the end of the routine for looking at the AUTOEXEC.BAT file.
- 7540 '
- 7550 '
- 7560 '
- 7570 'Here is the routine for adding lines to the end of AUTOEXEC.BAT.
- 7580 '
- 7590 'Label APPNDAUT
- 7600 IF DRIVE$="a:\" THEN FILE$="a:\autoexec.bat
- 7610 IF DRIVE$="A:\" THEN FILE$="a:\autoexec.bat
- 7620 IF DRIVE$="b:\" THEN FILE$="b:\autoexec.bat
- 7630 IF DRIVE$="B:\" THEN FILE$="b:\autoexec.bat
- 7640 IF DRIVE$="c:\" THEN FILE$="c:\autoexec.bat
- 7650 IF DRIVE$="C:\" THEN FILE$="c:\autoexec.bat
- 7660 IF DRIVE$="d:\" THEN FILE$="d:\autoexec.bat
- 7670 IF DRIVE$="D:\" THEN FILE$="d:\autoexec.bat
- 7680 OPEN FILE$ FOR APPEND AS 1
- 7690 'Label APPNDAGN
- 7700 PRINT
- 7710 INPUT "Line to add (Q to quit)";APPENDLN$
- 7720 IF APPENDLN$="q" OR APPENDLN$="Q" THEN CLOSE # 1:RETURN
- 7730 PRINT# 1, APPENDLN$
- 7740 GOTO 7690
- 7750 '
- 7760 'This is the end of the routine for adding to the end of AUTOEXEC.BAT.
- 7770 '
- 7780 '
- 7790 '
- 7800 'Here is the routine for continuing when the user is ready.
- 7810 'LABEL continue
- 7820 PRINT
- 7830 PRINT
- 7840 PRINT "Press any key to continue. ";
- 7850 IF INKEY$="" THEN 7850
- 7860 RETURN
- 7870 IF ERR=53 THEN PRINT "No system drivers available.":RESUME NEXT
-