Skip to content

Instantly share code, notes, and snippets.

@sudhakar6
Created May 4, 2022 19:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sudhakar6/398df6412c571dc87494289e875eabd9 to your computer and use it in GitHub Desktop.
Save sudhakar6/398df6412c571dc87494289e875eabd9 to your computer and use it in GitHub Desktop.
Windows batch script to find a string in files names and replace with another string. Ex: file.md-meta.xml to file1.md-meta.xml. It loops through the all files and changes file name
@echo off
setlocal enableDelayedExpansion
for %%F in (*.md-meta.xml) do (
set "name=%%F"
ren "!name!" "!name:.md-meta=1.md-meta!"
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment