Last active
August 22, 2019 15:35
-
-
Save rajanm/e73bf7ae6ccea598296ea3f7ee848a07 to your computer and use it in GitHub Desktop.
DOS batch file utility to rename files in bulk.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
rem Name: Bulk File Rename | |
rem DOS batch file utility to rename files in bulk. | |
setlocal enableDelayedExpansion | |
set /p "string1=Enter the character sequence to be replaced in the filename: " | |
set /p "string2=Enter the new character sequence in the filename: " | |
for %%F in (*%string1%*.*) do ( | |
set "filename=%%F" | |
ren "!filename!" "!filename:%string1%=%string2%!" | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment