{"id":9998,"date":"2021-12-05T02:08:45","date_gmt":"2021-12-05T02:08:45","guid":{"rendered":"https:\/\/lgildv5i97.onrocket.site\/answers\/?post_type=question&#038;p=9998"},"modified":"2021-12-05T02:09:05","modified_gmt":"2021-12-05T02:09:05","slug":"solved-batch-file-property-file-string-search-and-change-the-value","status":"publish","type":"question","link":"https:\/\/computing.net\/answers\/programming\/batch-file-property-file-string-search-and-change-the-value\/30374.html","title":{"rendered":"Solved Batch File Property File String Search And Change The Value"},"content":{"rendered":"<p>I have a batch file to search a string in a property file and after finding the string, replacing its value to anew value&#8230;This script was working fine since last month.Now it is doesnot working in any of the machines. i ran it in Windows 2008 server, windows 64 bit os everything.i checked antivirus too&#8230;but no issue found there.Can anyone help me to identify any code issue is there.<\/p>\n<p>filename: Build.properties<\/p>\n<p>label=12345<br \/>\nphase=test<br \/>\n*************************<br \/>\ni need to search label and replace value of it from 12345 to 5678<\/p>\n<p>Please find the script<br \/>\n**************************************************************<\/p>\n<p>(<br \/>\nFOR \/f &#8220;usebackqdelims=&#8221; %%a IN (D:\\Build.properties) DO (<br \/>\nFOR \/f &#8220;tokens=1*delims==&#8221; %%g IN (&#8220;%%a&#8221;) DO (<br \/>\nIF \/i &#8220;%%g&#8221;==&#8221;label&#8221; (ECHO(%%g<br \/>\n) ELSE (ECHO(%%a)<br \/>\n)<br \/>\n)<br \/>\n)&gt;temp1.properties<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"inline_featured_image":false,"iawp_total_views":7},"question-category":[55],"question_tags":[],"class_list":["post-9998","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\/9998","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=9998"}],"wp:attachment":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/media?parent=9998"}],"wp:term":[{"taxonomy":"question-category","embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question-category?post=9998"},{"taxonomy":"question_tags","embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question_tags?post=9998"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}