-
I am trying to open a text file and read through each line. If the line begins with the specified string, I want to change it to read something different. I am able to open it and read each line okay, but I can't figure out how to do the updating. Can somebody please show me how?
Thank you.
-
One way would be something like this pseudo-code
1. Create a NewTextFile
2. assign a Variable = ReadLineFromOldTextFile
3. If Left$(Variable, Len)SearchString)) = SearchString Then Variable = ChangedVariable
4. Write Variable to NewTextFile
5. When done, close and delete original text file
6. close new text file and rename it to original text file's name.