{"id":11179,"date":"2021-12-07T10:53:25","date_gmt":"2021-12-07T10:53:25","guid":{"rendered":"https:\/\/lgildv5i97.onrocket.site\/answers\/?post_type=question&#038;p=11179"},"modified":"2021-12-07T10:53:53","modified_gmt":"2021-12-07T10:53:53","slug":"solved-batch-file-the-will-check-xml-file-string-and-replace-value","status":"publish","type":"question","link":"https:\/\/computing.net\/answers\/programming\/batch-file-the-will-check-xml-file-string-and-replace-value\/28744.html","title":{"rendered":"Solved Batch File The Will Check Xml File String And Replace Value"},"content":{"rendered":"<p>Need a batch file the will check my xml file and replace value of a string. hope you can help<\/p>\n<p>@echo off<br \/>\nsetlocal EnableDelayedExpansion<br \/>\nset &#8220;_search=value1&#8221;<br \/>\nset &#8220;_replace=A&#8221;<br \/>\nset &#8220;_search=value2&#8221;<br \/>\nset &#8220;_replace=B&#8221;<\/p>\n<p>for \/F &#8220;delims=&#8221; %%a in (LastestFRN.xml) DO (<br \/>\nset line=%%a<br \/>\nsetlocal EnableDelayedExpansion<br \/>\n&gt;&gt; LastestFRN3.xml echo(!line:%_search%=%_replace%!<br \/>\nendlocal<br \/>\n)<br \/>\ndel LastestFRN.xml<br \/>\nrename LastestFRN3.xml LastestFRN.xml<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"inline_featured_image":false,"iawp_total_views":14},"question-category":[55],"question_tags":[],"class_list":["post-11179","question","type-question","status-publish","hentry","question-category-programming"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question\/11179","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question"}],"about":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/types\/question"}],"author":[{"embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/comments?post=11179"}],"wp:attachment":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/media?parent=11179"}],"wp:term":[{"taxonomy":"question-category","embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question-category?post=11179"},{"taxonomy":"question_tags","embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question_tags?post=11179"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}