Computer and Software Support

DOS Command Rename

Type: Internal (1.0 and later)


RENAME (REN) [d:][path]filename filename

Purpose: Changes the filename under which a file is stored.



RENAME changes the name of the first filename you enter to the second filename you enter. If you enter a path designation for the first filename, the renamed file will be stored on that same path.

Wildcard characters (* or ?) may be used with either the first or second filename designation.



To change the name of the file SALES.TXT on drive A to NEWSALES.TXT on drive A, enter

ren a:sales.txt newsales.txt

To change the filename extensions to TXT on all files on drive B that have SAL as the first three characters of the main filename, enter

ren b:sal*.* sal*.txt


This page is from I pasted it on my website to avoid possible broken links. For further help with DOS commands, Check out.