How to remove lines in text file?

How to remove lines in text file ?


Welcome to UiPath Forum.

You can try the below one

First read text file using ‘Read Text File’ activity and store the result in a string variable(Ex:strtext)

then use the below,

LineArray=strtext.Split(Environment.NewLine.ToArray, StringSplitOptions.RemoveEmptyEntries)

Where 3 is the index of the line you want to eliminate/remove.

Hope this will be useful. Thank you.

1 Like