How To Rename Files and Folders in Windows CMD
rename) command can be used to rename files and folders in the Window command prompt (CMD).
The syntax of the
rename command is as follows:
rename file-name new-file-name
Rename file1.txt to file2.txt:
ren file1.txt file2.txt
Rename the name of a directory from Pictures to Documents:
ren Pictures Documents
Use quotation marks if the file or folder name contains spaces:
ren "New folder" "Documents"
ren command supports wildcards to rename multiple files at once. For example, the following command renames the extension of all files in a folder (from
ren *.txt *.doc
Note that you can’t move files from one directory to another with the
ren command. For that, use the move command.