Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!umich!samsung!brutus.cs.uiuc.edu!jarthur!spectre.ccsf.caltech.edu!tybalt.caltech.edu!toddpw From: toddpw@tybalt.caltech.edu (Todd P. Whitesel) Newsgroups: comp.sys.apple Subject: Re: File splitter wanted Message-ID: <1990Mar12.100358.12876@spectre.ccsf.caltech.edu> Date: 12 Mar 90 10:03:58 GMT References: <1808@crash.cts.com> Sender: news@spectre.ccsf.caltech.edu Organization: California Institute of Technology Lines: 29 jamesio@pro-europa.cts.com (James Faircloth) writes: >I am looking for a program that will split a large ascii file (in excess of >2.8 megs) into smaller files. (i.e. split file xxx into files xxx.001, >xxx.002, etc) >The program needs to be able to split the original file into smaller files of >a certain size (10k, 20k, or xk). >Anybody have an idea??? I assume this is on a prodos volume because if so then you can use BASIC.SYSTEM and Applesoft to do it. 10 s=20 : REM this is how many K you want the small pieces to be 20 f$="filename" : REM replace lines 10 & 20 with INPUT statements if you want 30 d$=chr$(4) 40 i=0 50 print d$"bload "f$",t4,A$1000,L"s*1024",B"i*s*1024 60 print d$"bsave "f$"."i",t4,A$1000" 70 i=i+1:goto 50 this program will bomb with and "END OF FILE" error when it is finished. other that that, it should work as long as s is not more than 32 or so. unless there's something about the BI I forgot... Todd Whitesel toddpw @ tybalt.caltech.edu