Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!rutgers!lll-lcc!well!tenney From: tenney@well.UUCP Newsgroups: comp.sys.ibm.pc Subject: Re: Truncating MS-DOS files Message-ID: <2596@well.UUCP> Date: Mon, 16-Feb-87 05:40:16 EST Article-I.D.: well.2596 Posted: Mon Feb 16 05:40:16 1987 Date-Received: Tue, 17-Feb-87 02:43:59 EST References: <1987Feb15.123004.21019@gpu.utcs.toronto.edu> <4141@diamond.Diamond.BBN.COM> Reply-To: tenney@well.UUCP (Glenn S. Tenney) Organization: Whole Earth 'Lectronic Link, Sausalito, CA Lines: 18 In article <4141@diamond.Diamond.BBN.COM> mlandau@Diamond.BBN.COM (Matt Landau) writes: >If you seek to a file position, write zero bytes, and close the file, the >file is truncated at the seek position. This behavior is consistent in all >versions of PC- and MS-DOS from 2.0 to 3.2, but since it is not documented, >there's no guarantee it won't go away sometime in the future. >... That is exactly the way it is documented! RTFM: function 28 Random Block Write ... If CX is zero upon entry, no records are written, but the file is set to the length specified by the random record field, whether longer or shorter than the current file size. !!! -- Glenn Tenney UUCP: {hplabs,glacier,lll-crg,ihnp4!ptsfa}!well!tenney ARPA: well!tenney@LLL-CRG.ARPA Delphi and MCI Mail: TENNEY As Alphonso Bodoya would say... (tnx boulton) Disclaimers? DISCLAIMERS!? I don' gotta show you no stinking DISCLAIMERS!