Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Hi all,
In short, I have an XML file that needs to have some information deleted from it when a batch file runs. The file's data changes constently, so I cannot select only certain line #s to delete or only lines containing a predefined text string.
Is there a way to delete all text from "x" to "y" in a text file using a batch file?
A sample of the XML is listed below. In this sample I'd like to find the text starting with <connections> and ending with </connections> and then delete it:
</POLICE-REPORTS>
<QUEUE-MANAGER>
<CONNECTIONS>
<MASI_QMAFR_REPORTS>B360DEC2129B
<AMS_QMDATA>449A10725EDB51F53
<AMS_DEFAULT>449A1
</CONNECTIONS>
<DATAOBJECTS>
<MAXLOGSIZE>D98E38I'm very new to this, and could only find posts with examples to delete specific lines or matched text, not a range. Any help is greatly appreciated.
THANKS!

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |