Find File and Replace word in XML or TXT

0

Hello,

I have to create a DOS command line script (Windows), which finds one or several .xml files that are located in a certain directory and changes a value of a tag, this tag can be fixed, I will always search for it and change it for a pre-established value.

Directory - C: \ XML (in this directory the files generated by the system will be deposited to change the tag)

We assume that when executing a dir in this directory list three .xml files (test1.xml, test2.xml and test3.xml), file numbers and their names will not be default.

After locating the files all must be checked to find and replace a certain phrase (TAG) within the file. Example, find the tag <nome>fulano</nome> and replace with <nome>ciclano</nome>

    
asked by anonymous 29.01.2018 / 18:23

0 answers