Windows Ren Command Tutorial with Examples To Rename Files and Folders
ren command is used to rename files and folder.
ren command provides command line renaming in MS DOS or cmd.exe.
The most simple usage of
ren command is renaming one file. In this example we will provide the source or original file name and destination or new file name. Original file name is
myfile and new file name is
> ren myfile yourfile
Rename Multiple Files
If we have bulk list of files running
ren one by one is very trivial task.
renre command support renaming multiple files in a single shot. This is generally used to change extension of files.
In this example we will rename all
*.bak extensions to the
> ren *.bak *.txt
As well as directories can be renamed with
ren command. This is the same as renaming file. In this example we will rename file named
>ren test mytest
While working with different files and folders names we should take attention the names with spaces. Space is interpreter differently in MS DOS. So to make
ren command operations more safely we can surround files and directory names with
" double quotes.
> ren "My File" "Your File"