Changes the name of the file or files you specify.
You can rename all files matching the specified filename. You cannot use the RENAME command to rename files across drives or to move files to a different directory location. To rename subdirectories or move files, use the MOVE command.
REN[AME] /?
REN[AME] [drive:][path]filename1 | directory1 filename2 | directory2
For information about renaming directories, see the
MOVE command.
For information about renaming a disk, see the
LABEL command.
For information about copying files to a different drive or
directory, see the COPY
command.
For information about copying entire directories to a new
location, see the XCOPY
command.
Equivalent Linux BASH commands:
mv - Move or rename files or directories.
You can use wildcards (* and ?) in either filename parameter. If you use wildcards in filename2, the characters represented by the wildcards will be identical to the corresponding characters in filename1.
If, for filename2, you specify a filename that already exists, RENAME displays the message:
Duplicate file name or file not found
REN was allowed as an abbreviation since v1.1
Suppose you want to change the extensions of all the filenames in the current directory that have the extension .TXT; for example, suppose you want to change the .TXT extensions to .DOC extensions. To make this change, type:
REN *.TXT *.NEW
To rename a file named CHAP10 (on drive B) to PART10, type:
REN B:CHAP10 PART10
The newly renamed file PART10 remains on drive B.
none.