Remove last line from text file

In the topic below it is explained how to remove the first line of a .txt file. I am interested to know how to remove the last line of a .txt file. Thanks.

1 Like

First use the ‘line count’ activity, then supply the output of that activity - 1 (since index starts at 0, but count starts at 1)

2 Likes

Thanks so much Dave. It worked perfectly.

2 Likes