10 *|"Before I get swamped with complaints (if I'm lucky), The reason DFS users don't have the directories shown on the screen is because it is too difficult to read the screen, find a blank line then try to cont- inue reading it. 20 *|"You can get over this by doing a special command. Read the KEYS below. 30 *|"There are no REM statements in this, Every REM type message is in a star type line, like this. 40 *|"I believe someone asked for a DFS and ADFS version of this program, But as 8BitPD don't put who the user is who created the program the other user is commenting about, I am not sure. However, Please tell me what you think of this. 50 *|"In the near future, I will be doing a MUCH, MUCH, MUCH faster version of this, it will be so fast, it won't read the catalogue of the tv or screen. This version has a few extra commands, They are :- 60 *|" 'A' - Access one or all files, Reversing the current 'lock' status. 70 *|" 'D' - Delete a selected file. You have TWO chances to abort. 80 *|" '$' - Select DIR $ in ADFS and in DFS. 90 *|" 'P' - Printer dump of the screen. (You may imply your own PD here). 100 *|" '*' - OSCLI command (The boreing one!). 110 *|" 'Q' - Quit from program. 120 *|" 'S' - Change sides or drive of the disc. 130 *|"DELETE - If you enter the wrong 'first' number, You can delete it and start again. 140 *|"2095-1695-1702-1724-5028 (This is the bytes used at different stages of this being programmed from the 20/01/93 to the 15/05/93. 150 *|"Copyright John Ilsley 20/01/93 160 *|"Revised for DFS/ADFS 15/05/93. 170 ONERROR MODE7:REPORT:PRINTERL:END 180 MODE7 190 DIM file$(47):DIM lock$(47):DIM bit(5):DIM dir$(47) 200 GOTO 300 210 220 *|"Its Initiation area 230 FOR l=0 TO 47:file$(l)="":lock$(l)="":dir$(l)="":NEXT 260 drive$="":title$="":FOR l=1TO5:bit(l)=0:NEXT 270 F=FNfs 280 IF F=4 THEN f$="DISC" : RETURN 281 IF F=8 THEN f$="ADFS" : RETURN 300 IF FNfs=8 THEN PRINT"ADFS":f$="ADFS":GOTO 330 310 IF FNfs=4 THEN PRINT"DISC":f$="DISC":GOTO 330 320 PRINT"I need a FS to work with!...":END 330 IF f$="ADFS" MODE3:GOTO 720 340 IF f$="DISC" MODE7:GOTO 490 350 360 *|" Main scan routine. 370 DEFFNscan(x%,y%,length%) 380 LOCALresult$,loop% 390 PRINTTAB(x%,y%); 400 FORloop%=1TOlength%:A%=135:result$=result$+CHR$(USR &FFF4 MOD &10000 DIV &FF):VDU9:NEXT 401 =result$ 410 420 *|" Check for FSN 430 DEFFNfs 440 X%=&70:Y%=0:A%=0:fs%=USR(&FFDA) AND &FF 450 =fs% 460 REM 8 = ADFS / 4=DISC / 3=RAM / 1=TAPE 470 480 *|" DFS scan screen variables 490 GOSUB 230 500 MODE7:*. 510 PRINT'';CHR$136;" Reading filenames, Please wait" 520 drive$=FNscan(6,1,1) 530 t$=FNscan(0,0,12) 540 k=1 550 w$=MID$(t$,k,1) 560 IF w$=" " THEN GOTO 590 570 k=k+1 580 GOTO 550 590 title$=MID$(t$,1,k) 600 fc=4:dc=4 610 l=1 620 max=l 630 A$=FNscan(fc,dc,10) 640 IF A$=" " THEN max=max-1:GOTO 1370 650 file$(l)=MID$(A$,1,7) 660 lock$(l)=MID$(A$,10,1) 670 IF fc=4 THEN fc=24:GOTO 690 680 IF fc=24 THEN fc=4:dc=dc+1:GOTO 690 690 l=l+1:GOTO 620 700 710 *|" ADFS scan screen variables 720 *MOUNT 0 730 *DIR $ 740 GOSUB230 750 MODE3:*. 760 PRINT'';CHR$136;" Reading filenames, Plese wait" 770 drive$=FNscan(6,1,1) 780 t$=FNscan(0,0,20) 790 k=1 800 w$=MID$(t$,k,1) 810 IF w$=" " THEN GOTO 840 820 k=k+1 830 GOTO 800 840 title$=MID$(t$,1,k) 850 fc=0 :dc=4 860 l=1 870 max=l 880 A$=FNscan(fc,dc,10) 890 IF A$=" " max=max-1:GOTO 1370 900 file$(l)=MID$(A$,1,10) 910 A$=FNscan(fc+11,dc,1) 920 lock$(l)=A$ 930 IF lock$(l)="D" THEN dir$(l)="D" 940 IF fc=0 THEN fc=20:GOTO980 950 IF fc=20 THEN fc=40:GOTO980 960 IF fc=40 THEN fc=60:GOTO980 970 IF fc=60 THEN fc=0:dc=dc+1 980 l=l+1 990 GOTO 870 1000 1010 *|" Incase it 'forgets' what system it is in. 1020 f=FNfs 1030 IF f=4 THEN f$="DISC" 1040 IF f=8 THEN f$="ADFS" 1050 IF f$="DISC" GOTO 1080 1060 IF f$="ADFS" GOTO 1220 1070 1080 *|"Show DFS files 1090 MODE7:CLS 1100 aca=0:acb=5:d=0 1110 FOR l=1 TO max 1120 IF l<10 THEN l$="0"+STR$(l):GOTO1140 1130 l$=STR$(l) 1140 PRINTTAB(aca,d);l$;").";TAB(acb,d);file$(l);" ";lock$(l) 1150 d=d+1 1160 IF d=16 THEN aca=20:acb=25:d=0 1170 NEXT 1180 PRINTTAB(18,22);"Drive ";drive$;" - Title" 1190 PRINTTAB(18,23);title$; 1200 GOTO 1390 1210 1220 *|"Show ADFS files 1230 MODE7:CLS 1240 aca=0:acb=5:d=0 1250 FOR l=1 TO max 1260 IF l<10 THEN l$="0"+STR$(l):GOTO 1280 1270 l$=STR$(l) 1280 IF dir$(l)="D" THEN both$="Dir" ELSE both$=lock$(l) 1290 PRINTTAB(aca,d);l$;").";TAB(acb,d);file$(l);" ";both$; 1300 d=d+1 1310 IF d=25 THEN aca=20:acb=25:d=0 1320 NEXT 1330 PRINTTAB(18,23);CHR$(134);"Drive ";drive$;" - Title"; 1340 PRINTTAB(18,24);CHR$(131);title$; 1350 GOTO 1390 1360 1370 *|"Select menu (first input) 1380 GOTO 1010 1390 cor$="0123456789Cc*$FfDdAaSs" 1400 REPEAT 1410 q$=GET$ 1420 UNTIL INSTR(cor$,q$) 1430 IF f$="DISC" AND q$="C" OR q$="c" PROCchangeFS 1440 IF f$="ADFS" AND q$="C" OR q$="c" PROCchangeFS 1450 IF q$="*" PROCoscli:GOTO 1390 1460 IF q$="F" OR q$="f" PROCchangeFS:RUN 1470 IF q$="A" OR q$="a" GOTO1880 1480 IF q$="S" OR q$="s" GOTO2670 1490 IF q$="D" OR q$="d" GOTO2260 1500 IF q$="$" OSCLI"DIR$":RUN 1510 1520 *|"Select menu (second input) 1530 REPEAT 1540 b$=GET$ 1550 IF b$=CHR$(127) VDU7:GOTO 1390 1560 UNTIL INSTR(cor$,b$) 1570 IF f$="DISC" AND b$="C" OR b$="c" PROCchangeFS 1580 IF f$="ADFS" AND b$="C" OR b$="c" PROCchangeFS 1590 IF b$="*" PROCoscli:GOTO 1390 1600 IF b$="F" OR b$="f" PROCchangeFS:RUN 1610 IF b$="S" OR b$="s" GOTO2670 1620 IF b$="D" OR b$="d" GOTO2260 1630 IF b$="A" OR b$="a" GOTO1880 1640 n$=q$+b$ 1650 n=VAL(n$) 1660 fn$=file$(n) 1670 IF dir$(n)="D" THEN OSCLI"DIR "+file$(n):GOTO 740 1680 X=OPENIN(fn$) 1690 FOR b=0TO5 1700 bit(b)=BGET#X 1710 NEXT 1720 CLOSE#0 1730 FOR l=0TO5 1740 PRINT;l;" - ";bit(l) 1750 NEXT 1760 IF bit(0)=13 AND bit(1)=0 THEN CHAIN fn$ 1770 OSCLI"RUN "+fn$ 1780 1790 *|"Just to do a PRINT 1800 DEFPROCplace(a$) 1801 PROCclear 1810 PRINTTAB(18,22);CHR$(130);a$ 1820 ENDPROC 1830 DEFPROCclear 1840 PRINTTAB(18,22);STRING$(19," ") 1850 ENDPROC 1860 1870 *|"Lock / Unlock routine 1880 PROCplace("Auto lock/unlock") 1890 cor$="0123456789@*" 1900 REPEAT 1910 a$=GET$ 1920 UNTIL INSTR(cor$,a$) 1930 IF a$="*" PROCdoall:GOTO 1010 1940 IF a$="@" GOTO1010 1950 REPEAT 1960 b$=GET$ 1970 UNTIL INSTR(cor$,a$) 1980 IF b$="@" GOTO1010:GOTO 1010 1990 z$=a$+b$ 2000 n=VAL(z$) 2010 PROCclear 2020 f=FNfs 2030 PROCdo 2040 GOTO 1010 2050 2060 *|"Decides the type of lock requied 2070 DEFPROCdo 2080 IF f=8 AND lock$(n)="D" THEN y$="D" 2090 IF f=8 AND lock$(n)="L" THEN OSCLI"ACCESS "+file$(n)+" WR":y$="W" 2100 IF f=4 AND lock$(n)="L" THEN OSCLI"ACCESS "+file$(n):y$=" " 2110 IF f=8 AND lock$(n)="W" THEN OSCLI"ACCESS "+file$(n)+" LRW":y$="L" 2120 IF f=4 AND lock$(n)=" " THEN OSCLI"ACCESS "+file$(n)+" L":y$="L" 2130 lock$(n)=y$ 2140 ENDPROC 2150 2160 *|"A smart peice of programming here! (Reverses the current lock status) 2170 DEFPROCdoall 2180 PROCclear:PROCplace("Takes Ages,Wait!") 2190 f=FNfs 2200 FOR n=1 TO max 2210 PROCdo 2220 NEXT 2230 ENDPROC 2240 2250 *|"Delete files routine 2260 PROCplace("Delete File(s)") 2270 cor$="0123456789@" 2280 REPEAT 2290 a$=GET$ 2300 UNTIL INSTR(cor$,a$) 2310 IF a$="@" GOTO 1020 2320 REPEAT 2330 b$=GET$ 2340 UNTIL INSTR(cor$,b$) 2350 z$=a$+b$ 2360 n=VAL(z$) 2370 PROCclear 2380 f$=file$(n) 2390 PROCclear:PROCplace("Delete "+f$+" Y/n") 2400 a$=GET$ 2410 IF a$="Y" OR a$="y" PROCclear:PROCplace("Confirm "+f$):GOTO2440 2420 IF a$="N" OR a$="n" PROCclear:GOTO 2260 2430 GOTO 2400 2440 a$=GET$ 2450 IF a$="Y" OR a$="y" OSCLI"ACCESS "+file$(n):OSCLI"DELETE "+file$(n):PROCclear:GOTO 2260 2460 GOTO 1020 2470 2480 *|"The boring old OSCLI routine which I'm so peed of with! 2490 DEFPROCoscli 2500 CLS 2510 PRINT"Enter '*' command" 2520 INPUT'" "a$ 2530 OSCLI"*"+a$ 2540 PRINT'"* = again or other to quit" 2550 a$=GET$ 2560 IF a$="*" GOTO 2520 2570 ENDPROC 2580 2590 DEFPROCchangeFS 2600 *|"Switches between ADFS and DFS and ADFS 2610 f=FNfs 2620 CLS 2630 IF f=8 THEN PRINT"Selecting DFS":OSCLI"DISC":RUN 2640 IF f=4 THEN PRINT"Selecting ADFS":OSCLI"ADFS":RUN 2650 GOTO 2630 2660 2670 *|"Change drives in ADFS or sides and drives in DFS 2680 f=FNfs 2690 CLS 2700 IF f=4 GOTO 2810 2710 IF f=8 GOTO 2730 2720 2730 *|"Change the ADFS one 2740 PRINT'"Your on drive ";drive$ 2750 PRINT'"Enter NEW drive. 0 1 4 5" 2760 REPEAT 2770 a$=GET$ 2780 UNTIL INSTR("0145",a$) 2790 OSCLI"MOUNT "+a$:GOTO740 2800 2810 *|"Change the DFS one 2820 PRINT'"Your on drive ";drive$ 2830 PRINT"and directory ";dir$(1) 2840 PRINT'"Enter new drive. 0 1 2 3" 2850 REPEAT 2860 a$=GET$ 2870 UNTIL INSTR("0123",a$) 2880 OSCLI"DRIVE "+a$ 2890 MODE7:*. 2900 PRINT'"Enter new directory " 2910 a$=GET$ 2920 OSCLI"DIR "+a$:GOTO 480