I have a file that has dates and results of tests, written line by line. I would like to edit the file such that any line that does not have today's date is deleted and then the file is saved (with the unwanted lines deleted). Help will be greatly appreciated.
Dim rawlines() As String
Dim outputlines As New List(Of String)
rawlines = File.ReadAllLines("C:\users\user10\rslts.csv")
For Each line As String In rawlines
If line.Contains(today()) = True Then
outputlines.Add(line)
End If
Next
Read Lines:
Write lines to new file: