Skip to content

Instantly share code, notes, and snippets.

@joe-oli
Created October 27, 2024 01:01
Show Gist options
  • Save joe-oli/1bdde5e7d4736ff49842eda4f350b969 to your computer and use it in GitHub Desktop.
Save joe-oli/1bdde5e7d4736ff49842eda4f350b969 to your computer and use it in GitHub Desktop.
Batch file to rename folders This.Is.My.Folder.(2024) Will be renamed "This Is My Folder (2024)" i.e. remove the dots
@echo off
setlocal enabledelayedexpansion
for /d %%F in (*.*) do (
set "folder=%%F"
set "newfolder=!folder:.= !"
ren "%%F" "!newfolder!"
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment