Skip to content

Instantly share code, notes, and snippets.

@Soulwest
Created August 30, 2023 10:59
Show Gist options
  • Save Soulwest/e821d33e1b598cf82a354d4b3fb8b5e2 to your computer and use it in GitHub Desktop.
Save Soulwest/e821d33e1b598cf82a354d4b3fb8b5e2 to your computer and use it in GitHub Desktop.
Windows batch rename for CDN
Win+R cmd
cd somethere/
for /f "Tokens=*" %f in ('dir /l/b/a-d') do (rename "%f" "%f")
cmd /e:on /v:on /c "for %f in ("* *.*") do (set "n=%~nxf" & set "n=!n: =_!" & ren "%~ff" "!n!" )"
*.* may be replaced with *.exe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment