' ' This little routine shows how to find the length of a ' file, useful if you need to reserve a bank. ' ' ' Rem show a file selector Rem and load program SETUP NAME$=Fsel$("Df0:","","Select File") If NAME$="" Then End : Rem user chose 'QUIT' ' ' Only the next 3 lines of code are necessary to find the length - ' the rest of the program is not really needed. ' Open In 1,NAME$ : Rem open a input channel (The filename is in NAME$) L=Lof(1) : Rem get length of file Close 1 : Rem the variable 'L' now contains the length of the file in BYTES ' ' Rem you will now have the length of the file NAME$ Rem held in the variable 'L' TMP$="The file is" : Rem start of string TMP$=TMP$+Str$(L) : Rem add the length of the file to our string TMP$=TMP$+" Bytes Long." : Rem finish string Rem centre final string Locate 0,0 : Centre TMP$ ' ' ' Procedure SETUP