10 REM CHOPPER - FILE SPLITTER 20 REM Version 0.4 30 REM By Andrew Black 40 REM (c) Andrew Soft 1991 50 : 60 REM"ƒThis program has been placed 70 REM"ƒinto Public Domain. 80 : 90 VDU22,7 100 PROCtitle 110 : 120 ON ERROR PROCerror(0) 130 extra%=0:*FX14,6 140 VDU23;8202;0;0;0; 150 : 160 INPUT" Enter source drive: "sdrive% 170 IF sdrive%>3 OR sdrive%<0 GOTO 160 180 PRINT 190 INPUT" Enter destination drive: "ddrive% 200 IF ddrive%>3 OR ddrive%<0 GOTO 190 210 CLS 220 PRINT 230 INPUT" Enter file to split: "file$ 240 file$=":"+STR$(sdrive%)+"."+file$ 250 : 260 input%=OPENIN(file$) 270 : 280 IF input%=0 THEN PROCerror(1) 290 : 300 length%=EXT# input% 310 time%=length% DIV 116 320 PRINT'" Fileƒ"+file$+"‡is†&";~length%;"‡bytes long" 330 : 340 PRINT 350 INPUT" Enter block size: "bsize$ 360 bsize%=EVAL(bsize$) 370 IF bsize%>length% OR bsize%<1 THEN GOTO 350 380 : 390 blocks%=length% DIV bsize% 400 bits%=length% MOD bsize% 410 IF bits%>0 THEN extra%=1 420 : 430 PRINT'SPC1;blocks%+extra%" files will be produced." 440 PROCcontinue 450 PRINT 460 INPUT" Enter file standard: "sfile$ 470 IF LEN(sfile$)>5 THEN GOTO 460 480 sfile$=":"+STR$(ddrive%)+".L."+sfile$ 490 PRINT'" This will take ";(time% DIV 60);" mins and ";(time% MOD 60);" secs." 500 PRINT 510 : 520 FOR I%=1 TO blocks% 530 : 540 output%=OPENOUT(sfile$+STR$(I%)) 550 PRINTCHR$(134)+MID$(sfile$+STR$(I%),4,LEN(sfile$+STR$(I%))) 560 : 570 FOR Q%=1 TO bsize% 580 BPUT# output%, BGET# input% 590 NEXT 600 : 610 CLOSE#output% 620 : 630 NEXT 640 : 650 IF extra%=0 THEN CLOSE#input%:PRINT'"ƒSuccessful transfer":I$=INKEY$(200):PROCexit 660 : 670 output%=OPENOUT(sfile$+STR$(I%)) 680 PRINTCHR$(134)+MID$(sfile$+STR$(I%),4,LEN(sfile$+STR$(I%))) 690 : 700 FOR N%=1 TO bits% 710 BPUT# output%, BGET# input% 720 NEXT 730 : 740 CLOSE#output% 750 CLOSE#input% 760 : 770 PRINT'"ƒSuccessful transfer":I$=INKEY$(200):PROCexit 780 END 790 : 800 DEF PROCerror(num%) 810 PRINT'"ƒˆError! Error!‡" 820 PRINT 830 IF num%=1 THEN PRINT"File "+file$+" is not on the disc.":CLOSE#0:END 840 : 850 REPORT:END 860 ENDPROC 870 : 880 DEFPROCtitle 890 PRINT"—ppppppppppppppppppppppppppppppppppppppp"; 900 VDU134,157,141 910 PRINT"„File Chopper by Andrew Black" 920 VDU134,157,141 930 PRINT"File Chopper by Andrew Black" 940 PRINT"”```````````````````````````````````````" 950 VDU28,0,24,39,4 960 ENDPROC 970 : 980 DEFPROCexit 990 CLS 1000 INPUT" Exit (Y/N)",ext$ 1010 IFext$="N"THENCLS:GOTO110 1020 END 1030 ENDPROC 1040 : 1050 DEF PROCcontinue 1060 PRINT"ƒContinue (Y/N)" 1070 G$=GET$ 1080 IF G$="Y" THEN ENDPROC 1090 CLOSE#0:CLS:GOTO110 1100 ENDPROC