Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!wuarchive!udel!new From: new@udel.edu (Darren New) Newsgroups: comp.sys.amiga.tech Subject: Re: truncating a file. Message-ID: <12569@nigel.udel.EDU> Date: 28 Feb 90 23:08:09 GMT References: <591@galadriel.bt.co.uk> <3042@draken.nada.kth.se> Sender: usenet@udel.EDU Reply-To: new@udel.edu (Darren New) Organization: University of Delaware Lines: 17 In article <3042@draken.nada.kth.se> d88-skl@nada.kth.se (Stellan Klebom) writes: >Well, maybe ther is a way to do it >but the you have to fiddle directly with the sectors on disk. Be advised that under the OFS there are MANY places where the length is stored. What is shown by LIST is not what is copied by COPY and is not necessarily what is used by Seek(). Take this from one who tried to use DiskEd to chop the Control-Zs from executables downloaded by XModem. A better way would be to store in the first longword of the database a number saying how many valid bytes are in the file. You could even have a utility that would copy the file to another (or the same) floppy that would only copy the indicated number of bytes. Then the user would not have to wait everytime a record was deleted for you to copy 400K+ from one place on the floppy to another. Good luck! -- Darren