Subj : Re: more chess To : Rodney.Hester@xspamp11.f45.n396.z1. From : Steve Date : Thu Nov 29 2001 02:54 am From: "E. S. (Steve) Fabian" Rodney.Hester@xspamp11.f45.n396.z1.fidonet.org wrote: > > In a message of 24 Nov 01 Jasen Betts wrote to All: > > JB> I'm looking for a way to truncate a file but I can't find one - > JB> %@fileseek[%fh,0,1] doesn't do it like it 'should' - 4dos > JB> treats that a a special case :( > > If I'm correctly understanding your definition of 'truncate', @fileseek can't > be used for that at all. Why not just delete the file and then use "touch /c" > to recreate it as a 0-byte file? > > If that isn't what you meant by truncate, skip it. :) > > - Rodney > > --- Spot 1.3b Unregistered > * Origin: What's the point? (1:396/45.11) If (as Rodney interprets it) you mean by "truncate" to remove ALL of its content, an even easier way is >FILE_TO_BE_TRUNCATED which will create a new file, or replace the exsiting file with a 0-byte file. If you intended to start writing to a file at a specific position, overwriting whateve was beyond it, you can use @fileseek, followed by @filewrite. However, if you did not overwrite the rest of the file PAST its original end, the original information might be left over... -- E. S. "Steve" Fabian ESFabian@BellAtlantic.net POB 1540, Cherry Hill, NJ 08034 Telephone: 856-354-1752 EMPIRE Consultants, Inc. Director, Software Development ------------------------------------------------------------------- --- BBBS/NT v4.01 Flag-2 * Origin: Mach2 Systems (1:342/3) .