PDA

View Full Version : Write over lines 5-6 in textfile.... (editing .txt)


isaaclloyd
05-22-2005, 01:10 AM
I am wondering if there is a way to replace or "write over" certain lines in a textfile, BUT keep all the other lines. Kind of like:



...

FSO.WriteLine(mytext(5,6), true)

...



Any comments or suggestions would greatly be appreciated. Thanks.

~Isaac~

Morgoth
05-22-2005, 06:57 AM
To do this, I think the only method would be to read all data from the text file and put it in a string or each line in an array.

Then, replace the line you want to in the string, or in the array.

After that, you just write it back to the text file (writing over all the text).


I don't think there is an easier way, but I may be wrong.