Dim l As List = File.ReadList("filePath", "filename") 'put each line of the text file into a list
l.RemoveAt(l.Size-1) 'remove the last line
l.Add("new line text here") 'add your new line
File.WriteList("savePath", "filename", l) 'save the list to a new file (if necessary)