Saved Bookmarks
| 1. |
Solve : Batch code to find and replace strings in xml files and move them to new folder? |
|
Answer» HI i need a BATCH CODE to find and replace the below two tasks(Task_RunOwt,Task_RunDbdIo) if found with another task(Task_RunGenericIo) in around 1500 xml files..is it possible??? The changed files should be moved to different folder after replacing the strings... old tasks to be replaced: 1) Quote <task>2) Quote <task>NEW Task Which has to be substituted in place of above two tasks if found in the xml files: Quote <task> Points to be noted: Quote *uid,pass,fail and incomplete tags and its content in the xml code should remain unchanged,only the code in between the uid and pass tags should be replaced with following It would be of great help if this works out...Thanks in advance...Does it have to be in batch? I know repl.bat uses java script, and might be what you are looking for. https://www.dropbox.com/s/qidqwztmetbvklt/repl.bat You'll have to ask Squashman or Foxidrive for more info on it, as I haven't used it much. Quote from: Venkat on June 28, 2014, 04:36:52 PM Hi i need a BATCH CODE to find and replace the below two tasks(Task_RunOwt,Task_RunDbdIo) if found with another task(Task_RunGenericIo) in around 1500 xml files. I have a few questions: Will any xml file contain both Task_RunOwt and Task_RunDbdIo tasks? Will any xml file contain more than one of the tasks? Are all 1500 xml files in a single folder? Hi Lemonilla, Quote Does it have to be in batch? It is not mandatory to be in a batch , Any code is fine which makes the replacement of 2 tasks task in xml file to RunGenericIo Task.i ll check that link which u sent and let u no if it works.Hi Foxi, Quote Will any xml file contain both Task_RunOwt and Task_RunDbdIo tasks? 1)I dont think any Xml file contains both the tasks Task_RunOwt and Task_RunDbdIo in a single XML File , But even if thats the scenario ,replacement has to be done with Task_RunGenericIo since other two tasks are deprecated. 2)Yup every Xml file has many different tasks which has Task_RunOwt and Task_RunDbdIo repeated no. of times or only once. 3)All 1500 xml files are not in single folder,they are in different folders of same directory. 4)Task_RunOwt and Task_RunDbdIo tasks are deprecated in the tool i work with, so i need them get replaced with Task_RunGenericIo which is used for writing data in volumes of Client Orcs mentioned.. Quote https://www.dropbox.com/s/qidqwztmetbvklt/repl.bat Will this code help me out Foxi/SquashMan??? Is so pls tell me.. |
|