{"id":27,"date":"2013-08-01T20:19:55","date_gmt":"2013-08-01T19:19:55","guid":{"rendered":"http:\/\/ketandesai.co.uk\/?p=27"},"modified":"2026-03-22T15:59:28","modified_gmt":"2026-03-22T15:59:28","slug":"renaming-files-using-batch","status":"publish","type":"post","link":"https:\/\/ketandesai.co.uk\/index.php\/2013\/08\/01\/renaming-files-using-batch\/","title":{"rendered":"Renaming Files Using Batch"},"content":{"rendered":"\n<p>i often have to change the file names of music i have imported from CD this little script allows me to remove the track number from the file name. <\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#FFFFFF\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#000000;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>@echo off\nsetlocal DisableDelayedExpansion\nfor \/f \"usebackq delims=\" %%N in (`dir \/s \/b`) do (\n  set var=%%~nxN\n  setlocal EnableDelayedExpansion\n  set \"org=!var!\"\n  set \"var=!var:0 =!\"\n  set \"var=!var:1 =!\"\n  set \"var=!var:2 =!\"\n  set \"var=!var:3 =!\"\n  set \"var=!var:4 =!\"\n  set \"var=!var:5 =!\"\n  set \"var=!var:6 =!\"\n  set \"var=!var:7 =!\"\n  set \"var=!var:8 =!\"\n  set \"var=!var:9 =!\"\n  set \"var=!var:0=!\"\n  set \"var=!var:1=!\"\n  set \"var=!var:2=!\"\n  set \"var=!var:3=!\"\n  set \"var=!var:4=!\"\n  set \"var=!var:5=!\"\n  set \"var=!var:6=!\"\n  set \"var=!var:7=!\"\n  set \"var=!var:8=!\"\n  set \"var=!var:9=!\"\n  set \"var=!var:.mp=.mp3!\"\n\n  if not \"!var!\"==\"!org!\" (\n    if not exist \"%%~dpN!var!\" (\n      echo \"!org!\" --^> \"!var!\"\n      ren \"!org!\" \"!var!\"\n    ) else (\n      echo File \"!var!\" ^(from !org!^) already exists.\n    )\n  )\n  endlocal\n)\n<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki light-plus\" style=\"background-color: #FFFFFF\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #000000\">@<\/span><span style=\"color: #0000FF\">echo<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #0000FF\">off<\/span><\/span>\n<span class=\"line\"><span style=\"color: #0000FF\">setlocal<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #0000FF\">DisableDelayedExpansion<\/span><\/span>\n<span class=\"line\"><span style=\"color: #AF00DB\">for<\/span><span style=\"color: #000000\"> \/f <\/span><span style=\"color: #A31515\">&quot;usebackq delims=&quot;<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #001080\">%%N<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #AF00DB\">in<\/span><span style=\"color: #000000\"> (`dir \/s \/b`) <\/span><span style=\"color: #AF00DB\">do<\/span><span style=\"color: #000000\"> (<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  <\/span><span style=\"color: #0000FF\">set<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #001080\">var<\/span><span style=\"color: #000000\">=<\/span><span style=\"color: #001080\">%%~nxN<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  <\/span><span style=\"color: #0000FF\">setlocal<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #0000FF\">EnableDelayedExpansion<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  <\/span><span style=\"color: #0000FF\">set<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&quot;<\/span><span style=\"color: #001080\">org<\/span><span style=\"color: #000000\">=<\/span><span style=\"color: #001080\">!var!<\/span><span style=\"color: #A31515\">&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  <\/span><span style=\"color: #0000FF\">set<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&quot;<\/span><span style=\"color: #001080\">var<\/span><span style=\"color: #000000\">=<\/span><span style=\"color: #001080\">!var:<\/span><span style=\"color: #A31515\">0 <\/span><span style=\"color: #001080\">=!<\/span><span style=\"color: #A31515\">&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  <\/span><span style=\"color: #0000FF\">set<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&quot;<\/span><span style=\"color: #001080\">var<\/span><span style=\"color: #000000\">=<\/span><span style=\"color: #001080\">!var:<\/span><span style=\"color: #A31515\">1 <\/span><span style=\"color: #001080\">=!<\/span><span style=\"color: #A31515\">&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  <\/span><span style=\"color: #0000FF\">set<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&quot;<\/span><span style=\"color: #001080\">var<\/span><span style=\"color: #000000\">=<\/span><span style=\"color: #001080\">!var:<\/span><span style=\"color: #A31515\">2 <\/span><span style=\"color: #001080\">=!<\/span><span style=\"color: #A31515\">&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  <\/span><span style=\"color: #0000FF\">set<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&quot;<\/span><span style=\"color: #001080\">var<\/span><span style=\"color: #000000\">=<\/span><span style=\"color: #001080\">!var:<\/span><span style=\"color: #A31515\">3 <\/span><span style=\"color: #001080\">=!<\/span><span style=\"color: #A31515\">&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  <\/span><span style=\"color: #0000FF\">set<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&quot;<\/span><span style=\"color: #001080\">var<\/span><span style=\"color: #000000\">=<\/span><span style=\"color: #001080\">!var:<\/span><span style=\"color: #A31515\">4 <\/span><span style=\"color: #001080\">=!<\/span><span style=\"color: #A31515\">&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  <\/span><span style=\"color: #0000FF\">set<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&quot;<\/span><span style=\"color: #001080\">var<\/span><span style=\"color: #000000\">=<\/span><span style=\"color: #001080\">!var:<\/span><span style=\"color: #A31515\">5 <\/span><span style=\"color: #001080\">=!<\/span><span style=\"color: #A31515\">&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  <\/span><span style=\"color: #0000FF\">set<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&quot;<\/span><span style=\"color: #001080\">var<\/span><span style=\"color: #000000\">=<\/span><span style=\"color: #001080\">!var:<\/span><span style=\"color: #A31515\">6 <\/span><span style=\"color: #001080\">=!<\/span><span style=\"color: #A31515\">&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  <\/span><span style=\"color: #0000FF\">set<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&quot;<\/span><span style=\"color: #001080\">var<\/span><span style=\"color: #000000\">=<\/span><span style=\"color: #001080\">!var:<\/span><span style=\"color: #A31515\">7 <\/span><span style=\"color: #001080\">=!<\/span><span style=\"color: #A31515\">&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  <\/span><span style=\"color: #0000FF\">set<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&quot;<\/span><span style=\"color: #001080\">var<\/span><span style=\"color: #000000\">=<\/span><span style=\"color: #001080\">!var:<\/span><span style=\"color: #A31515\">8 <\/span><span style=\"color: #001080\">=!<\/span><span style=\"color: #A31515\">&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  <\/span><span style=\"color: #0000FF\">set<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&quot;<\/span><span style=\"color: #001080\">var<\/span><span style=\"color: #000000\">=<\/span><span style=\"color: #001080\">!var:<\/span><span style=\"color: #A31515\">9 <\/span><span style=\"color: #001080\">=!<\/span><span style=\"color: #A31515\">&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  <\/span><span style=\"color: #0000FF\">set<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&quot;<\/span><span style=\"color: #001080\">var<\/span><span style=\"color: #000000\">=<\/span><span style=\"color: #001080\">!var:<\/span><span style=\"color: #A31515\">0<\/span><span style=\"color: #001080\">=!<\/span><span style=\"color: #A31515\">&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  <\/span><span style=\"color: #0000FF\">set<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&quot;<\/span><span style=\"color: #001080\">var<\/span><span style=\"color: #000000\">=<\/span><span style=\"color: #001080\">!var:<\/span><span style=\"color: #A31515\">1<\/span><span style=\"color: #001080\">=!<\/span><span style=\"color: #A31515\">&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  <\/span><span style=\"color: #0000FF\">set<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&quot;<\/span><span style=\"color: #001080\">var<\/span><span style=\"color: #000000\">=<\/span><span style=\"color: #001080\">!var:<\/span><span style=\"color: #A31515\">2<\/span><span style=\"color: #001080\">=!<\/span><span style=\"color: #A31515\">&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  <\/span><span style=\"color: #0000FF\">set<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&quot;<\/span><span style=\"color: #001080\">var<\/span><span style=\"color: #000000\">=<\/span><span style=\"color: #001080\">!var:<\/span><span style=\"color: #A31515\">3<\/span><span style=\"color: #001080\">=!<\/span><span style=\"color: #A31515\">&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  <\/span><span style=\"color: #0000FF\">set<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&quot;<\/span><span style=\"color: #001080\">var<\/span><span style=\"color: #000000\">=<\/span><span style=\"color: #001080\">!var:<\/span><span style=\"color: #A31515\">4<\/span><span style=\"color: #001080\">=!<\/span><span style=\"color: #A31515\">&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  <\/span><span style=\"color: #0000FF\">set<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&quot;<\/span><span style=\"color: #001080\">var<\/span><span style=\"color: #000000\">=<\/span><span style=\"color: #001080\">!var:<\/span><span style=\"color: #A31515\">5<\/span><span style=\"color: #001080\">=!<\/span><span style=\"color: #A31515\">&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  <\/span><span style=\"color: #0000FF\">set<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&quot;<\/span><span style=\"color: #001080\">var<\/span><span style=\"color: #000000\">=<\/span><span style=\"color: #001080\">!var:<\/span><span style=\"color: #A31515\">6<\/span><span style=\"color: #001080\">=!<\/span><span style=\"color: #A31515\">&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  <\/span><span style=\"color: #0000FF\">set<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&quot;<\/span><span style=\"color: #001080\">var<\/span><span style=\"color: #000000\">=<\/span><span style=\"color: #001080\">!var:<\/span><span style=\"color: #A31515\">7<\/span><span style=\"color: #001080\">=!<\/span><span style=\"color: #A31515\">&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  <\/span><span style=\"color: #0000FF\">set<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&quot;<\/span><span style=\"color: #001080\">var<\/span><span style=\"color: #000000\">=<\/span><span style=\"color: #001080\">!var:<\/span><span style=\"color: #A31515\">8<\/span><span style=\"color: #001080\">=!<\/span><span style=\"color: #A31515\">&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  <\/span><span style=\"color: #0000FF\">set<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&quot;<\/span><span style=\"color: #001080\">var<\/span><span style=\"color: #000000\">=<\/span><span style=\"color: #001080\">!var:<\/span><span style=\"color: #A31515\">9<\/span><span style=\"color: #001080\">=!<\/span><span style=\"color: #A31515\">&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  <\/span><span style=\"color: #0000FF\">set<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&quot;<\/span><span style=\"color: #001080\">var<\/span><span style=\"color: #000000\">=<\/span><span style=\"color: #001080\">!var:<\/span><span style=\"color: #A31515\">.mp<\/span><span style=\"color: #001080\">=<\/span><span style=\"color: #A31515\">.mp3<\/span><span style=\"color: #001080\">!<\/span><span style=\"color: #A31515\">&quot;<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  <\/span><span style=\"color: #AF00DB\">if<\/span><span style=\"color: #000000\"> not <\/span><span style=\"color: #A31515\">&quot;<\/span><span style=\"color: #001080\">!var!<\/span><span style=\"color: #A31515\">&quot;<\/span><span style=\"color: #000000\">==<\/span><span style=\"color: #A31515\">&quot;<\/span><span style=\"color: #001080\">!org!<\/span><span style=\"color: #A31515\">&quot;<\/span><span style=\"color: #000000\"> (<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">    <\/span><span style=\"color: #AF00DB\">if<\/span><span style=\"color: #000000\"> not <\/span><span style=\"color: #0000FF\">exist<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&quot;<\/span><span style=\"color: #001080\">%%~dpN!var!<\/span><span style=\"color: #A31515\">&quot;<\/span><span style=\"color: #000000\"> (<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">      <\/span><span style=\"color: #0000FF\">echo<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&quot;<\/span><span style=\"color: #001080\">!org!<\/span><span style=\"color: #A31515\">&quot;<\/span><span style=\"color: #000000\"> --<\/span><span style=\"color: #EE0000\">^<\/span><span style=\"color: #000000\">&gt; <\/span><span style=\"color: #A31515\">&quot;<\/span><span style=\"color: #001080\">!var!<\/span><span style=\"color: #A31515\">&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">      <\/span><span style=\"color: #0000FF\">ren<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&quot;<\/span><span style=\"color: #001080\">!org!<\/span><span style=\"color: #A31515\">&quot;<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #A31515\">&quot;<\/span><span style=\"color: #001080\">!var!<\/span><span style=\"color: #A31515\">&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">    ) <\/span><span style=\"color: #AF00DB\">else<\/span><span style=\"color: #000000\"> (<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">      <\/span><span style=\"color: #0000FF\">echo<\/span><span style=\"color: #000000\"> File <\/span><span style=\"color: #A31515\">&quot;<\/span><span style=\"color: #001080\">!var!<\/span><span style=\"color: #A31515\">&quot;<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #EE0000\">^<\/span><span style=\"color: #000000\">(from <\/span><span style=\"color: #001080\">!org!<\/span><span style=\"color: #EE0000\">^<\/span><span style=\"color: #000000\">) already exists.<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">    )<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  )<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  <\/span><span style=\"color: #0000FF\">endlocal<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">)<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre><\/div>\n","protected":false},"excerpt":{"rendered":"<p>i often have to change the file names of music i have imported from CD this little script allows me to remove the track number from the file name.<\/p>\n","protected":false},"author":1,"featured_media":1032,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[12,5,10],"tags":[13,6,9],"class_list":["post-27","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-batch","category-scripting","category-windows","tag-batch","tag-scripting-2","tag-windows-2"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Renaming Files Using Batch<\/title>\n<meta name=\"description\" content=\"Renaming Files Using Batch\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/ketandesai.co.uk\/index.php\/2013\/08\/01\/renaming-files-using-batch\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Renaming Files Using Batch\" \/>\n<meta property=\"og:description\" content=\"Renaming Files Using Batch\" \/>\n<meta property=\"og:url\" content=\"https:\/\/ketandesai.co.uk\/index.php\/2013\/08\/01\/renaming-files-using-batch\/\" \/>\n<meta property=\"og:site_name\" content=\"Ketan Desai\" \/>\n<meta property=\"article:published_time\" content=\"2013-08-01T19:19:55+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-03-22T15:59:28+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/ketandesai.co.uk\/wp-content\/uploads\/2013\/08\/Bat-Script.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1536\" \/>\n\t<meta property=\"og:image:height\" content=\"1024\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Ketan Desai\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Ketan Desai\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/ketandesai.co.uk\\\/index.php\\\/2013\\\/08\\\/01\\\/renaming-files-using-batch\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/ketandesai.co.uk\\\/index.php\\\/2013\\\/08\\\/01\\\/renaming-files-using-batch\\\/\"},\"author\":{\"name\":\"Ketan Desai\",\"@id\":\"https:\\\/\\\/ketandesai.co.uk\\\/#\\\/schema\\\/person\\\/76fbe7aaa79643c166c5c2475fc01424\"},\"headline\":\"Renaming Files Using Batch\",\"datePublished\":\"2013-08-01T19:19:55+00:00\",\"dateModified\":\"2026-03-22T15:59:28+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/ketandesai.co.uk\\\/index.php\\\/2013\\\/08\\\/01\\\/renaming-files-using-batch\\\/\"},\"wordCount\":33,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/ketandesai.co.uk\\\/#\\\/schema\\\/person\\\/76fbe7aaa79643c166c5c2475fc01424\"},\"image\":{\"@id\":\"https:\\\/\\\/ketandesai.co.uk\\\/index.php\\\/2013\\\/08\\\/01\\\/renaming-files-using-batch\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/ketandesai.co.uk\\\/wp-content\\\/uploads\\\/2013\\\/08\\\/Bat-Script.png\",\"keywords\":[\"batch\",\"scripting\",\"windows\"],\"articleSection\":[\"Batch\",\"Scripting\",\"Windows\"],\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/ketandesai.co.uk\\\/index.php\\\/2013\\\/08\\\/01\\\/renaming-files-using-batch\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/ketandesai.co.uk\\\/index.php\\\/2013\\\/08\\\/01\\\/renaming-files-using-batch\\\/\",\"url\":\"https:\\\/\\\/ketandesai.co.uk\\\/index.php\\\/2013\\\/08\\\/01\\\/renaming-files-using-batch\\\/\",\"name\":\"Renaming Files Using Batch\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/ketandesai.co.uk\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/ketandesai.co.uk\\\/index.php\\\/2013\\\/08\\\/01\\\/renaming-files-using-batch\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/ketandesai.co.uk\\\/index.php\\\/2013\\\/08\\\/01\\\/renaming-files-using-batch\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/ketandesai.co.uk\\\/wp-content\\\/uploads\\\/2013\\\/08\\\/Bat-Script.png\",\"datePublished\":\"2013-08-01T19:19:55+00:00\",\"dateModified\":\"2026-03-22T15:59:28+00:00\",\"description\":\"Renaming Files Using Batch\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/ketandesai.co.uk\\\/index.php\\\/2013\\\/08\\\/01\\\/renaming-files-using-batch\\\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/ketandesai.co.uk\\\/index.php\\\/2013\\\/08\\\/01\\\/renaming-files-using-batch\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/ketandesai.co.uk\\\/index.php\\\/2013\\\/08\\\/01\\\/renaming-files-using-batch\\\/#primaryimage\",\"url\":\"https:\\\/\\\/ketandesai.co.uk\\\/wp-content\\\/uploads\\\/2013\\\/08\\\/Bat-Script.png\",\"contentUrl\":\"https:\\\/\\\/ketandesai.co.uk\\\/wp-content\\\/uploads\\\/2013\\\/08\\\/Bat-Script.png\",\"width\":1536,\"height\":1024},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/ketandesai.co.uk\\\/index.php\\\/2013\\\/08\\\/01\\\/renaming-files-using-batch\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/ketandesai.co.uk\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Renaming Files Using Batch\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/ketandesai.co.uk\\\/#website\",\"url\":\"https:\\\/\\\/ketandesai.co.uk\\\/\",\"name\":\"Ketan Desai\",\"description\":\"Anything IT\",\"publisher\":{\"@id\":\"https:\\\/\\\/ketandesai.co.uk\\\/#\\\/schema\\\/person\\\/76fbe7aaa79643c166c5c2475fc01424\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/ketandesai.co.uk\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/ketandesai.co.uk\\\/#\\\/schema\\\/person\\\/76fbe7aaa79643c166c5c2475fc01424\",\"name\":\"Ketan Desai\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/6587572e3884edb2f25ce127069b15f15da32278153bc9b4d2568156fcb6ec41?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/6587572e3884edb2f25ce127069b15f15da32278153bc9b4d2568156fcb6ec41?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/6587572e3884edb2f25ce127069b15f15da32278153bc9b4d2568156fcb6ec41?s=96&d=mm&r=g\",\"caption\":\"Ketan Desai\"},\"logo\":{\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/6587572e3884edb2f25ce127069b15f15da32278153bc9b4d2568156fcb6ec41?s=96&d=mm&r=g\"},\"sameAs\":[\"http:\\\/\\\/staging.ketandesai.co.uk\"],\"url\":\"https:\\\/\\\/ketandesai.co.uk\\\/index.php\\\/author\\\/ketandesaiadmin\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Renaming Files Using Batch","description":"Renaming Files Using Batch","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/ketandesai.co.uk\/index.php\/2013\/08\/01\/renaming-files-using-batch\/","og_locale":"en_GB","og_type":"article","og_title":"Renaming Files Using Batch","og_description":"Renaming Files Using Batch","og_url":"https:\/\/ketandesai.co.uk\/index.php\/2013\/08\/01\/renaming-files-using-batch\/","og_site_name":"Ketan Desai","article_published_time":"2013-08-01T19:19:55+00:00","article_modified_time":"2026-03-22T15:59:28+00:00","og_image":[{"width":1536,"height":1024,"url":"https:\/\/ketandesai.co.uk\/wp-content\/uploads\/2013\/08\/Bat-Script.png","type":"image\/png"}],"author":"Ketan Desai","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Ketan Desai","Estimated reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/ketandesai.co.uk\/index.php\/2013\/08\/01\/renaming-files-using-batch\/#article","isPartOf":{"@id":"https:\/\/ketandesai.co.uk\/index.php\/2013\/08\/01\/renaming-files-using-batch\/"},"author":{"name":"Ketan Desai","@id":"https:\/\/ketandesai.co.uk\/#\/schema\/person\/76fbe7aaa79643c166c5c2475fc01424"},"headline":"Renaming Files Using Batch","datePublished":"2013-08-01T19:19:55+00:00","dateModified":"2026-03-22T15:59:28+00:00","mainEntityOfPage":{"@id":"https:\/\/ketandesai.co.uk\/index.php\/2013\/08\/01\/renaming-files-using-batch\/"},"wordCount":33,"commentCount":0,"publisher":{"@id":"https:\/\/ketandesai.co.uk\/#\/schema\/person\/76fbe7aaa79643c166c5c2475fc01424"},"image":{"@id":"https:\/\/ketandesai.co.uk\/index.php\/2013\/08\/01\/renaming-files-using-batch\/#primaryimage"},"thumbnailUrl":"https:\/\/ketandesai.co.uk\/wp-content\/uploads\/2013\/08\/Bat-Script.png","keywords":["batch","scripting","windows"],"articleSection":["Batch","Scripting","Windows"],"inLanguage":"en-GB","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/ketandesai.co.uk\/index.php\/2013\/08\/01\/renaming-files-using-batch\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/ketandesai.co.uk\/index.php\/2013\/08\/01\/renaming-files-using-batch\/","url":"https:\/\/ketandesai.co.uk\/index.php\/2013\/08\/01\/renaming-files-using-batch\/","name":"Renaming Files Using Batch","isPartOf":{"@id":"https:\/\/ketandesai.co.uk\/#website"},"primaryImageOfPage":{"@id":"https:\/\/ketandesai.co.uk\/index.php\/2013\/08\/01\/renaming-files-using-batch\/#primaryimage"},"image":{"@id":"https:\/\/ketandesai.co.uk\/index.php\/2013\/08\/01\/renaming-files-using-batch\/#primaryimage"},"thumbnailUrl":"https:\/\/ketandesai.co.uk\/wp-content\/uploads\/2013\/08\/Bat-Script.png","datePublished":"2013-08-01T19:19:55+00:00","dateModified":"2026-03-22T15:59:28+00:00","description":"Renaming Files Using Batch","breadcrumb":{"@id":"https:\/\/ketandesai.co.uk\/index.php\/2013\/08\/01\/renaming-files-using-batch\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/ketandesai.co.uk\/index.php\/2013\/08\/01\/renaming-files-using-batch\/"]}]},{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/ketandesai.co.uk\/index.php\/2013\/08\/01\/renaming-files-using-batch\/#primaryimage","url":"https:\/\/ketandesai.co.uk\/wp-content\/uploads\/2013\/08\/Bat-Script.png","contentUrl":"https:\/\/ketandesai.co.uk\/wp-content\/uploads\/2013\/08\/Bat-Script.png","width":1536,"height":1024},{"@type":"BreadcrumbList","@id":"https:\/\/ketandesai.co.uk\/index.php\/2013\/08\/01\/renaming-files-using-batch\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/ketandesai.co.uk\/"},{"@type":"ListItem","position":2,"name":"Renaming Files Using Batch"}]},{"@type":"WebSite","@id":"https:\/\/ketandesai.co.uk\/#website","url":"https:\/\/ketandesai.co.uk\/","name":"Ketan Desai","description":"Anything IT","publisher":{"@id":"https:\/\/ketandesai.co.uk\/#\/schema\/person\/76fbe7aaa79643c166c5c2475fc01424"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/ketandesai.co.uk\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":["Person","Organization"],"@id":"https:\/\/ketandesai.co.uk\/#\/schema\/person\/76fbe7aaa79643c166c5c2475fc01424","name":"Ketan Desai","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/secure.gravatar.com\/avatar\/6587572e3884edb2f25ce127069b15f15da32278153bc9b4d2568156fcb6ec41?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/6587572e3884edb2f25ce127069b15f15da32278153bc9b4d2568156fcb6ec41?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/6587572e3884edb2f25ce127069b15f15da32278153bc9b4d2568156fcb6ec41?s=96&d=mm&r=g","caption":"Ketan Desai"},"logo":{"@id":"https:\/\/secure.gravatar.com\/avatar\/6587572e3884edb2f25ce127069b15f15da32278153bc9b4d2568156fcb6ec41?s=96&d=mm&r=g"},"sameAs":["http:\/\/staging.ketandesai.co.uk"],"url":"https:\/\/ketandesai.co.uk\/index.php\/author\/ketandesaiadmin\/"}]}},"jetpack_featured_media_url":"https:\/\/ketandesai.co.uk\/wp-content\/uploads\/2013\/08\/Bat-Script.png","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/ketandesai.co.uk\/index.php\/wp-json\/wp\/v2\/posts\/27","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ketandesai.co.uk\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ketandesai.co.uk\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ketandesai.co.uk\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ketandesai.co.uk\/index.php\/wp-json\/wp\/v2\/comments?post=27"}],"version-history":[{"count":1,"href":"https:\/\/ketandesai.co.uk\/index.php\/wp-json\/wp\/v2\/posts\/27\/revisions"}],"predecessor-version":[{"id":1033,"href":"https:\/\/ketandesai.co.uk\/index.php\/wp-json\/wp\/v2\/posts\/27\/revisions\/1033"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ketandesai.co.uk\/index.php\/wp-json\/wp\/v2\/media\/1032"}],"wp:attachment":[{"href":"https:\/\/ketandesai.co.uk\/index.php\/wp-json\/wp\/v2\/media?parent=27"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ketandesai.co.uk\/index.php\/wp-json\/wp\/v2\/categories?post=27"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ketandesai.co.uk\/index.php\/wp-json\/wp\/v2\/tags?post=27"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}