For renaming files, Batch Script provides the REN or RENAME command.
RENAME [drive:][path][directoryname1 | filename1] [directoryname2 | filename2]
Let’s take a look at some examples of renaming files.
rename *.txt *.bak
The above command will rename all text files to files with .bak extension.
rename "TESTA.txt" "TESTB.txt"
The above command will rename the file TESTA.txt to TESTB.txt.