For the moment i use this code wich is reading only one line at time:
How can i do if i want to read more than one specific line ?!Code:Dim Tr As IO.TextReader = System.IO.File.OpenText(My.Settings.masuratori_preluare_date) Dim TW As System.IO.TextWriter Dim nume_fisier As String Dim MyFileLine As String = Split(Tr.ReadToEnd(), vbCrLf)(6) & vbCrLf nume_fisier = My.Settings.masuratori_salvare_date & Format(Date.Now.Day) & "-" & Format(Date.Now.Month) & "-" & Format(Date.Now.Year) & " la " & Format(Date.Now.Hour) & "." & Format(Date.Now.Minute) & "." & Format(Date.Now.Second) & "s" & ".txt" Tr.Close() TW = System.IO.File.CreateText(nume_fisier) TW.WriteLine(MyFileLine) 'Write another line 'TW.WriteLine("Hello World Again") TW.Flush() TW.Close()
Thanks in advice!




Reply With Quote