QTIPS - Truncating DOS Files
Published By | Date | Version | Knowledge Level | Keywords |
---|---|---|---|---|
Sprezzatura Ltd | 01 MAY 1992 | 2.12+ | EXPERT | OSBWRITE |
Richard Guise informs us of an interesting use for the OSBWRITE command. It seems that if you want to truncate a file at a fixed length the easiest way is to OSBWRITE a null onto the character position to truncate at. Thus if a file were 10 MB in length and only the first 5 MB were required one would
OSBWRITE "" on File_Var at 5120000
(Volume 4, Issue 1, Page 4)