Rename multiple files in cmd

Make sure that there are more ? than there are characters in the longest name:

ren *.txt "???????????????????????????? 1.1.txt"

See How does the Windows RENAME command interpret wildcards? for more info.

New Solution – 2014/12/01

For those who like regular expressions, there is JREN.BAT – a hybrid JScript/batch command line utility that will run on any version of Windows from XP forward.

jren "^.*(?=\.)" "$& 1.1" /fm "*.txt"

or

jren "^(.*)(\.txt)$" "$1 1.1$2" /i

Leave a Comment