{"id":3313,"date":"2021-11-03T12:31:12","date_gmt":"2021-11-03T12:31:12","guid":{"rendered":"https:\/\/lgildv5i97.onrocket.site\/answers\/?post_type=question&#038;p=3313"},"modified":"2021-11-03T12:36:40","modified_gmt":"2021-11-03T12:36:40","slug":"batch-file-to-find-n-modify-text-in-ini-file","status":"publish","type":"question","link":"https:\/\/computing.net\/answers\/programming\/batch-file-to-find-n-modify-text-in-ini-file\/20887.html","title":{"rendered":"Batch File To Find &#8216;N Modify Text In Ini File"},"content":{"rendered":"<p>Hello, I&#8217;m quite &#8216;green&#8217; in programming and I need your help. I need a batch file which could find specified text line in .ini file, be able to delete that line and type in the text by your choice.<\/p>\n<p>(menu)<\/p>\n<p>@echo off<br \/>\necho.<br \/>\nset\/p NAME=&#8221;Please type in desired Steam User Name and press Enter: &#8221;<br \/>\necho.<br \/>\necho.<br \/>\nset\/p NAME=&#8221;Please type in desired Player Name and press Enter: &#8221;<\/p>\n<p>(rev.ini)<\/p>\n<p>need to find these to lines (below) in file, delete PLACEYOURNAMEHERE and replace the text by whatever you type in the menu (above)<\/p>\n<p>SteamUser = PLACEYOURNAMEHERE<\/p>\n<p>PlayerName = PLACEYOURNAMEHERE<\/p>\n<p>&nbsp;<\/p>\n<p>I&#8217;ve uploaded these files so you could take a good look what happened.<\/p>\n<p>This is the original rev.ini file<\/p>\n<p><a href=\"https:\/\/web.archive.org\/web\/20120526074228\/http:\/\/www.mediafire.com\/?gmwzjjytrmg\" target=\"_blank\" rel=\"noopener nofollow\">http:\/\/www.mediafire.com\/?gmwzjjytrmg<\/a><\/p>\n<p>This is the compiled rev.ini file (I typed mmm for both commands) As you can see new text bits have been added where the original one ends, but instead of replacing PLACEYOURNAMEHERE lines with mmm it adds everything at the very end of the original rev.ini including<br \/>\nthose bits.<\/p>\n<p><a href=\"https:\/\/web.archive.org\/web\/20120526074228\/http:\/\/www.mediafire.com\/?uk5tny422y2\" target=\"_blank\" rel=\"noopener nofollow\">http:\/\/www.mediafire.com\/?uk5tny422y2<\/a><\/p>\n<p>This is the batch file of yours i&#8217;ve modified<\/p>\n<p><a href=\"https:\/\/web.archive.org\/web\/20120526074228\/http:\/\/www.mediafire.com\/?yhzyjq2tnkj\" target=\"_blank\" rel=\"noopener nofollow\">http:\/\/www.mediafire.com\/?yhzyjq2tnkj<\/a><\/p>\n<p>I hope you&#8217;ll sort something out \ud83d\ude09<\/p>\n<p>Thank you in advance \ud83d\ude42<br \/>\nSorry for my English<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"inline_featured_image":false,"iawp_total_views":32},"question-category":[55],"question_tags":[],"class_list":["post-3313","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\/3313","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\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/comments?post=3313"}],"wp:attachment":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/media?parent=3313"}],"wp:term":[{"taxonomy":"question-category","embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question-category?post=3313"},{"taxonomy":"question_tags","embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question_tags?post=3313"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}