Article View: net.micro.pc
Article #5591Re: File truncation under PC-DOS
From: bill
Date: Wed, 05 Feb 1986 17:52
Date: Wed, 05 Feb 1986 17:52
15 lines
1065 bytes
1065 bytes
Truncating a file to 'n' bytes is fairly easy:
[1] Open the file for read/write access using Int 21h function 3Dh.
[2] Use Int 21h function 42h to position the file pointer to position 'n'.
[3] Truncate the file at that point by using Int 21h function 40h (Write
to File or Device) with a byte count of zero in CX.
[4] Close the file using Int 21h function 3Eh (or 4Ch).
bill frolik
hplabs!hp-pcd!bill
Technical Details
Message-ID:
<15200010@hpcvlo.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxt!houxm!whuxl!whuxlm!akgua!gatech!ut-sally!pyramid!hplabs!hp-pcd!billReferences:
<901@dataioDa.UUCP>Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxt!houxm!whuxl!whuxlm!akgua!gatech!ut-sally!pyramid!hplabs!hp-pcd!bill From: bill@hp-pcd.UUCP Newsgroups: net.micro.pc Subject: Re: File truncation under PC-DOS Message-ID: <15200010@hpcvlo.UUCP> Date: Wed, 5-Feb-86 12:52:00 EST Article-I.D.: hpcvlo.15200010 Posted: Wed Feb 5 12:52:00 1986 Date-Received: Tue, 11-Feb-86 03:41:14 EST References: <901@dataioDa.UUCP> Organization: Hewlett-Packard - Corvallis, OR Lines: 15 Nf-ID: #R:dataioDa:-90100:hpcvlo:15200010:000:413 Nf-From: hpcvlo!bill Feb 5 09:52:00 1986