RENAME renames a file/directory or files/directories.
RENAME [drive][path][directoryname1 | filename1]
[directoryname2 | filename2]
drive The drive letter, e.g. C:
path The directory, e.g. \example\ , complete:
directoryname1 The name of the old subdirectory, e.g. \dir_old ,
directoryname2 The name of the new subdirectory, e.g. dir_new ,
filename1 The old filename, e.g. \old_file.txt
filename2 The new filename, e.g. new_file.txt
- none -
You can also use REN instead of RENAME.
Note that you cannot specify a new drive or path for your destination.
Use the MOVE command for that purpose.
You can use wildcards (* and ?) to specify a set of files. If you use
wildcards in filename1, you must use wildcards in the same position
In pure DOS the directory name must not be longer than 8 letters.
Filenames use 8.3 means: 8 letters for the name, 3 letters for
ending, e.g. example1.txt.
RENAME is a command internal to command.com and needs no other file
in order to work.
rename C:\example\dir_old dir_new
rename C:\example\old_file.txt new_file.txt
Please read this command's lsm file also.
You will find the updated version (internet) here and
the version described in this manual page here.
The lsm file contains information about the name of the programmer,
the download site, and some other command related information.
Copyright © 1998 Jim Hall, updated 2007 by W. Spiegl.
This file is derived from the FreeDOS Spec Command HOWTO.
See the file H2Cpying for copying conditions.