|Thanks for the note.|
I'm obviously not a programmer. If I knew a better method, I would use it. The files transformed wrong, and the only other option we have is to manually edit them. If I can come up with a method to automate it, we save days worth of work.
I have several hundred zip files that I have to unzip the sco_content.xml file out of, then correct. I have to find the statements that contain [ isNumbered="false" ] and remove it, but only for Bulletitem2 and greater......not Bulletitem1's.
Then I have to add the corrected file back into the .zip file.
So lines 4 and 7 from the following snippet of code need to change.....
<text>Demonstrate active listening skills.</text>
<text>Identify active listening skills.</text>
<text>Practice active listening skills.</text>
Since I'm not touching all Bulletitem statements...first I check to see if the statement contains "isnumbered". Then I check to see if the BulletitemLevel2 or greater. If it is, I change
leaving the leading spaces in for readability.
I've been able to do everything I need to do, it's just that all the !'s in the file vanish.
I re-wrote the code to attempt to toggle delayedExpansion, which is apparently the only way to get the string into a variable with the ! characters intact. Prior to that, I had it enabled throughout the entire batch file, in order to use variables for the filenames, subfolders, destination folders, etc.