Hi All,
I'm looking for a way to find and replace a block of text across multiple files. The files are .cfg files written with an XML style code. Each file is in a different folder for which I could identify easily. The subset of code that I'd want to replace, at least initially, may be different, but once they have all been replaced once, would be the exact same as they would all get updated with the same information nightly. The formatting of the subset of code would look like the following:
<code line 1>
<code line 2>
<code line 3>
<opentag>
<datapoint1>data</datapoint1>
<datapoint2>data</datapoint2>
<datapoint3>data</datapoint3>
...
</opentag>
<code line 4>
<code line 5>
<code line 6>
I need to replace everything from <opentag> to </opentag> with a new set of data on a nightly basis. I'm looking for a script that can be run from a DOS batch command to do this for me; or, some other easy way to automate it on a schedule.
Any assistance would be much appreciated as I'm dying trying to maintain a variety of data sets for different clients...
Thanks in advance to all.
Tyler
I'm looking for a way to find and replace a block of text across multiple files. The files are .cfg files written with an XML style code. Each file is in a different folder for which I could identify easily. The subset of code that I'd want to replace, at least initially, may be different, but once they have all been replaced once, would be the exact same as they would all get updated with the same information nightly. The formatting of the subset of code would look like the following:
<code line 1>
<code line 2>
<code line 3>
<opentag>
<datapoint1>data</datapoint1>
<datapoint2>data</datapoint2>
<datapoint3>data</datapoint3>
...
</opentag>
<code line 4>
<code line 5>
<code line 6>
I need to replace everything from <opentag> to </opentag> with a new set of data on a nightly basis. I'm looking for a script that can be run from a DOS batch command to do this for me; or, some other easy way to automate it on a schedule.
Any assistance would be much appreciated as I'm dying trying to maintain a variety of data sets for different clients...
Thanks in advance to all.
Tyler