{"id":2852,"date":"2021-10-29T08:42:57","date_gmt":"2021-10-29T08:42:57","guid":{"rendered":"https:\/\/lgildv5i97.onrocket.site\/answers\/?post_type=question&#038;p=2852"},"modified":"2021-10-29T08:44:20","modified_gmt":"2021-10-29T08:44:20","slug":"copy-specific-line-using-batch-file","status":"publish","type":"question","link":"https:\/\/computing.net\/answers\/programming\/copy-specific-line-using-batch-file\/20668.html","title":{"rendered":"Copy Specific Line Using Batch File"},"content":{"rendered":"<p>I wanna accomplish following using a batch<br \/>\nfile:<\/p>\n<p>Search a folder for *.txt files and in each file<br \/>\nsearch for a specific string and copy only that<br \/>\nspecific line containing that string to another<br \/>\ntext file (output file).<br \/>\nFor example, if contents of the text file (say<br \/>\nPaul.txt) is :<\/p>\n<p>Name : ABCD<br \/>\nLocal Folder: \/\/abcdomain\/Folder1\/Paul.ini<br \/>\nDesignation : Programmer<\/p>\n<p>Now I have to open this file and copy the only<br \/>\nline containing the string &#8220;domain&#8221; ie<br \/>\nLocal Folder: \/\/abcdomain\/Folder1\/Paul.ini<br \/>\nin the output file<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"inline_featured_image":false,"iawp_total_views":4},"question-category":[55],"question_tags":[],"class_list":["post-2852","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\/2852","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=2852"}],"wp:attachment":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/media?parent=2852"}],"wp:term":[{"taxonomy":"question-category","embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question-category?post=2852"},{"taxonomy":"question_tags","embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question_tags?post=2852"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}