I need to removes few lines from a text file using only assign and invoke methods.
I used a Assign activity (in a variable of type list of strings): File.ReadAllLines(“Filepath”).ToList
Use invoke method to delete first 31 lines from the text file.
I tried using remove method but it displays error that list does not have public instance name ‘remove’.
Please suggest if anything needs to be configured in properties (parameters and arguments)
Please suggest an approach to implement this.
Dim delLine As Integer = 32
Dim lines As List(Of String) = System.IO.File.ReadAllLines("infile.txt").ToList
lines.RemoveAt(delLine - 1) ' index starts at 0
System.IO.File.WriteAllLines("outfile.txt", lines)