Setting EOF value

Started by
1 comment, last by BioLich 19 years, 6 months ago
If I have a file with lenght=X and I want to "truncate" it at Y, with Y<X, is there a way to set the EOF value to Y in order to delete only the part of the file that I don't want to use? Thanks. Claudio
________________________________________________________www.wizardofoz.tk
Advertisement
Quote:Original post by BioLich
If I have a file with lenght=X and I want to "truncate" it at Y, with Y<X, is there a way to set the EOF value to Y in order to delete only the part of the file that I don't want to use?
Thanks.
Claudio
I wouldn't even attempt to use window's ascii mode EOF character, that's little more than a CP/M relic.
Try Win32's SetEndOfFile or Unix's ftruncate.
It works perfectly, thanks again.
________________________________________________________www.wizardofoz.tk

This topic is closed to new replies.

Advertisement