Where in the code is it doing this…?
The very first time through the loop, you are assigning the first line read, followed by a linefeed character, followed by the current contents of rev, which is empty the first time through. So you start with the first line followed by a linefeed character, and you keep inserting each new line that is read before it, so there always is that linefeed character on the end.
…how can I keep the resulting file at 5 lines instead of 6?
To remove the extra linefeed character on the end, you can do this:
CODE:
FileAppend, % RTrim(rev, "`n"), %new%
Statistics: Posted by boiler — 33 minutes ago