Archive: Text-file manipulation within an installer


Text-file manipulation within an installer
I'm wondering if there's any convenient way to manipulate large text files within an installer: Specifically, to perform large-scale simple search-and-replace (it does not need to be so complicated as a regex; simple search-and-replace is fine). Strings are too small to contain the quantity of data involved: In most cases, I'm dealing with text files of 40-50 Kb each, extracted by the installer itself. Thus they're too big to simply use the standard string library. Obviously, I could write an extension DLL to do this, but that's a waste of time if there's already something written. So I'm wondering if anybody has already built a DLL for this, or if there's an existing chunk of code I can slap in from somewhere to do it.


the ReplaceInFile function is one of multiple scripts, which can search&replace text


Thanks. It's not exactly the most efficient piece of code I've ever seen, but it should do the job in a pinch.


I want somebody make a DLL to do this,because this function seem too large.


What? If you see my Advanced StrStr you will be impressed with its size (and with the "Advanced" word correctly put on the title...).