There are many ways you can go about doing this. I like using the _FileReadToArray, depending on if you have a way to split the lines (otherwise just do FileOpen w/ overwrite, FileRead, StringTrimRight, FileWrite, FileClose), use the count, which would be under index 0, and trim the string as you see fit, then write the array back using _FileWriteFromArray with FileOpen in overwrite mode. Let me know if you have any questions, as there is multiple ways of going about achieving what you would like.