Folks,
I want to open a file and remove the previous 2 lines and then write a new line. I know how to do the last bit i.e. adding the last line:
Can anyone help? How do you delete the previous 2 lines? Any suggestions/comments/ideas - much appreciated... - thanks.
Confused,
G.
I want to open a file and remove the previous 2 lines and then write a new line. I know how to do the last bit i.e. adding the last line:
VB.NET:
[size=2][color=#0000ff]Dim[/color][/size][size=2] fileName [/size][size=2][color=#0000ff]As[/color][/size][size=2][color=#0000ff]String[/color][/size]
[size=2]fileName = "C:\afile.txt"[/size]
[size=2]Microsoft.VisualBasic.FileSystem.FileOpen(1, fileName, OpenMode.Append)
WriteLine(1, String1, String2, String3, String4)
FileClose(1)
[/size]
Can anyone help? How do you delete the previous 2 lines? Any suggestions/comments/ideas - much appreciated... - thanks.
Confused,
G.