{"id":8149,"date":"2021-11-26T12:49:10","date_gmt":"2021-11-26T12:49:10","guid":{"rendered":"https:\/\/lgildv5i97.onrocket.site\/answers\/?post_type=question&#038;p=8149"},"modified":"2021-11-26T12:49:55","modified_gmt":"2021-11-26T12:49:55","slug":"batch-script-to-rename-file-extensions","status":"publish","type":"question","link":"https:\/\/computing.net\/answers\/programming\/batch-script-to-rename-file-extensions\/30423.html","title":{"rendered":"Batch Script To Rename File Extensions"},"content":{"rendered":"<p>Hi all,<\/p>\n<p>I was hoping you can help me with my struggle trying to write a batch script which will rename all &#8220;.txt&#8221; file to &#8220;.pip&#8221;<\/p>\n<p>Every week or so I receive some text files which I need to change the extensions for before putting through some software. I previously wrote a vba script which would do the renaming for me, but our IT team in their infinite wisdom have decided to block all vba scripts and will not unblock them.<\/p>\n<p>I have attempted to find some batch script online which will rename the file extensions however the problem is:<\/p>\n<p>1) I cannot figure out how to rename all files in the same folder as the batch file<br \/>\n2) The script fails with the error &#8220;UNC paths are not supported for current directory&#8221;<\/p>\n<p>Can anyone please help me put something together?<\/p>\n<p>Many thanks<\/p>\n<p>AWLT<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"inline_featured_image":false,"iawp_total_views":6},"question-category":[55],"question_tags":[],"class_list":["post-8149","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\/8149","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=8149"}],"wp:attachment":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/media?parent=8149"}],"wp:term":[{"taxonomy":"question-category","embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question-category?post=8149"},{"taxonomy":"question_tags","embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question_tags?post=8149"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}