Hi.
I need to read from one text file and then write it out to another text file.
IE.
Read the all the lines in file 'HCR.tmp' and write all the line from 'HCR.tmp' to 'HIVECLS.inf'
Here is the code i have been trying to use put im getting a problem with 'LINES' in bold.
Im getting Value of type '1-dimensional array of string' cannot be converted to 'string' error
Many thanks for your help.Code:Private Sub HiveCls() Dim lines() As String = IO.File.ReadAllText("C:\SFE\Temp\HCR.tmp") Dim CLSlines As New List(Of String)(IO.File.ReadAllLines("C:\SFE\Temp\HIVECLS.inf")) For CLSindex As Integer = 0 To CLSlines.Count - 1 If CLSlines(CLSindex) = "[AddReg]" Then CLSlines.Insert(CLSindex + 1, lines) Exit For End If Next IO.File.WriteAllLines("C:\SFE\Temp\HIVECLS.inf", CLSlines.ToArray()) End Sub
Worf




Reply With Quote