Changes the name of
a file or a set of files.
Specifies the location and name of the
file or set of files you want to rename.
Specifies the new name for the file. If
you use wildcards (* and ?), filename2 specifies the
new names for the files. You cannot specify a new drive or
path when renaming files.
Displays help at the command prompt.
You can rename all files matching the
specified file name. You cannot use the rename
command to rename files across drives or to move files to a
different directory location.
- Using wildcards
You can use wildcards (* and ?) in either
file name parameter. If you use wildcards in filename2,
the characters represented by the wildcards will be
identical to the corresponding characters in filename1.
- Rename will not
work if filename2 already exists
If, for filename2, you specify a
file name that already exists, rename displays the
Duplicate file name or file not found
Suppose you want to
change the extensions of all the file names in the current
directory that have the extension .txt; for example, you
want to change the .txt extensions to .doc extensions. To
make this change, type:
ren *.txt *.doc
To rename a file or
directory named Chap10 to Part10, type:
ren chap10 part10