I have a bunch of routines to create a plain text data file from a spreadsheet.
The files comprise literally thousands - or even tens of thousands - of lines, with usually only a few characters per line.
I want to run through a file - "myFile.txt" - i.e. read in every line, - and if it comes across, say, "ABC", then replace it with, say, "XYZ"
I *could* read in each line, and then write each line into another file, changed as necessary; then delete the old file and rename the new one with the name of the old file.
But is there a quicker / easier way ?
There may not be any occurrence, or there might be two or three - never more - and usually near the end of the file.
Bookmarks