I am creating a text file that stores a list of file names so that I know what files have been processed. I have figured out how to write a file to the .txt file, but have run into two problems. 1) each time i write the file name it just overwrites the previously inserted name and 2) how can i search the file names to see if a file name exists in the file?
Here is my code for the StreamWriter
Thanks in advance,
Chris
Here is my code for the StreamWriter
Code:
Public Sub WriteTextFile(ByVal FileName As String)
Dim objStreamWriter As StreamWriter
objStreamWriter = New StreamWriter("c:\textfile.txt")
objStreamWriter.WriteLine(FileName + " " + Date.Now)
objStreamWriter.Close()
End Sub
Chris