{"id":101,"date":"2021-09-03T01:58:58","date_gmt":"2021-09-03T01:58:58","guid":{"rendered":"https:\/\/lgildv5i97.onrocket.site\/answers\/programming-replace-dots-with-spaces-with-bat-file-28128-html"},"modified":"2021-09-03T03:05:57","modified_gmt":"2021-09-03T03:05:57","slug":"programming-replace-dots-with-spaces-with-bat-file-28128-html","status":"publish","type":"question","link":"https:\/\/computing.net\/answers\/programming\/replace-dots-with-spaces-with-bat-file\/28128.html","title":{"rendered":"Solved Replace dots with spaces with .bat file"},"content":{"rendered":"<p>&nbsp;<\/p>\n<p>Hello!<\/p>\n<p>I want to replace the dots in filenames with spaces. With the aid of a bat file<\/p>\n<p>Example file<br \/>\nMonkeys.Cant.Sing.mp3<\/p>\n<p>To<br \/>\nMonkeys Cant Sing.mp3<\/p>\n<p>I found this code that replaces dots with _ characters. I thought that I was able to modify the code to suit my needs, but I could not. I did not understand commands in the file. :-$<\/p>\n<p>@ echo off<br \/>\nsetlocal enabledelayedexpansion<br \/>\nfor%% j in (*. *) do (<br \/>\nset filename =%% ~ nj<br \/>\nset filename =! filename:. = _!<br \/>\nset filename =! filename: = _!<br \/>\nif not! &#8220;filename&#8221; == &#8220;%% ~ nj&#8221; ren &#8220;%% j&#8221; &#8220;: filename:%% ~ xj&#8221;<br \/>\n)<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","template":"","meta":{"inline_featured_image":false,"iawp_total_views":39},"question-category":[61],"question_tags":[],"class_list":["post-101","question","type-question","status-publish","hentry","question-category-netware"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question\/101","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=101"}],"wp:attachment":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/media?parent=101"}],"wp:term":[{"taxonomy":"question-category","embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question-category?post=101"},{"taxonomy":"question_tags","embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question_tags?post=101"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}