Text File IO

rmatthew

Well-known member
Joined
Dec 30, 2002
Messages
115
Location
Texas
I need to add lines to the text file at the bottom and pull (and delete) the line at the top. Is there a method for deleting lines in the top of a file?
 
I dont think there is. You should read in the entire file into an array
of lines, set the first element in the array to "", and then add a
few elements to the array (using Redim). Once youre done that,
create a String from the string array using
Code:
myString = String.Join(fileArray, ControlChars.CrLf).Trim()
Then, write that back to the file.
 
Back
Top