You can not simply insert stuff into existing lines of a text file. Instead, you have to completely rewrite the file. Open the original file for reading, open a new temp file for writing. In a loop, read each line of the original file and rewrite it with desired changes to the output file. After that is done, close both files, delete the original, and rename the temp to be the same name as the original.
Sponsor
Team Colleague
Featured Poster
Reputation Points: 5608
Solved Threads: 2280
Retired and Enjoying Life
Online 21,935 posts
since Aug 2005