|
-
May 27th, 2003, 11:56 AM
#1
Thread Starter
Addicted Member
Inserting text at the beginning of a text file
I am writing the app in VB.NET but this is not a .NET specific question.
I have an already existing text file that has 200 lines. I need to insert a line at the top of the document but all I can figure out how to do is append it to the end. Can anyone point me in the right direction?
Thanks,
Jim
-
May 27th, 2003, 12:07 PM
#2
Frenzied Member
I hate you, my book does not have that one.....
Best I could think of off the top of my head is to open it then save your new data over it then append the existing data to the file.
-
May 27th, 2003, 12:28 PM
#3
Thread Starter
Addicted Member
Well to be honest I have never read a file into memory, preserving its structure and then writing it to another file. Do you have the code for that?
-
May 27th, 2003, 01:04 PM
#4
Hyperactive Member
http://www.zdnet.com.au/builder/prog...0267367,00.htm
maybe dis will help.. why dont u like search in google.. for vb.net File I/O
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|