how to mass rename files code example

Example 1: cmd rename multiple files

# EXAMPLE: add "_zzz" to the name of each file found within the "G:\Deletable\" folder
for /d %F in ("G:\Deletable\*") do rename "%F" "%~nF_zzz%~xF"

# SYNTAX
# for <your-options> %F in ("<root-directory>\*") do rename "%F" "%~n#<your-text-to-add>%~xF"

Example 2: batch rename file

REM # | EXAMPLE (changes the "ChangeMyName.txt" file's name to "NameChanged.csv")
rename "C:/Users/JacquesK/ChangeMyName.txt" "NameChanged.csv"

REM # | SYNTAX
REM # | rename "<file-to-change-the-name-of>" "<new-file-name>"

Tags:

Misc Example