Re: Append text to top of file with VB 6.0?
From: Jonathan Wood (jwood_at_softcircuits.com)
Date: 07/28/04
- Next message: Mike D Sutton: "Re: Vb and NewsGroups"
- Previous message: Ron: "Re: Append text to top of file with VB 6.0?"
- In reply to: Ron: "Re: Append text to top of file with VB 6.0?"
- Next in thread: Ron: "Re: Append text to top of file with VB 6.0?"
- Reply: Ron: "Re: Append text to top of file with VB 6.0?"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 28 Jul 2004 14:14:39 -0600
There is no other way. The system does not allow you to rearrange file data
on the disk. You can read and write, extend, and truncate, and that's it.
I've written software that uses linked lists of data arranged throughout the
file. The application that does this, in effect, allows the user to insert
data items at the top of the file. I can offer thoughts on ways to do this.
But display of the data is controlled by the program. If you want to produce
a regular text file that can be read by other programs, you'll need to write
the file exactly as you want it to appear.
-- Jonathan Wood SoftCircuits http://www.softcircuits.com Available for consulting: http://www.softcircuits.com/jwood/resume.htm "Ron" <bapa118@online.nospam> wrote in message news:33D02D49-6B8C-481A-B521-AF1409666898@microsoft.com... > Thanks for the answer. I already knew that way of doing it. If by any chance someone knows another way, please let me know. > > thanks. > > "Karl E. Peterson" wrote: > > > Ron wrote: > > > Does anyone know of a way to append text to the top of a text file > > > with VB? I need to append one full line with a CR LF and sometimes > > > the file I am appending to can be rather large (over 10 gb). > > > > The only way is to write the new line, read the old file, write it. > > > > IOW, you're screwed. > > > > At least in Win32. Maybe in Win64 -- with another language? > > -- > > [Microsoft Basic: 1976-2001, RIP] > > > > > >
- Next message: Mike D Sutton: "Re: Vb and NewsGroups"
- Previous message: Ron: "Re: Append text to top of file with VB 6.0?"
- In reply to: Ron: "Re: Append text to top of file with VB 6.0?"
- Next in thread: Ron: "Re: Append text to top of file with VB 6.0?"
- Reply: Ron: "Re: Append text to top of file with VB 6.0?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|