RENAME EN)+Renaming Files

Changes the name of a file.

VERSION

PC-DOS: all

MS-DOS equivalent: RENAME EN) (all)

TYPE

Internal

SYNTAX

REN [d:][path]filename nfilename

OPTIONS

[d:][path]filename Specifies the drive, path, and

file name of the file to be

renamed.

nfilename Specifies the new name to be

assigned to the file (must be

on the same drive and path as

the file to be renamed).

EXAMPLES

REN TEST TEST1

BEFORE: TEST

AFTER: TEST1

REN *.CAP *.SET

BEFORE: LETTER.CAP

ACCT.CAP

.

.

.

AFTER: LETTER.SET

ACCT.SET

.

.

.

UNDO

Repeat the REN command to rename the newly named file to its

original file name.

MESSAGES

Duplicate file name or file not found

The file already exists on the drive/directory specified with the

name you are trying to assign, or the file to be renamed cannot

be found. Check to see that you have entered the file name

correctly; then reissue the REN command.

Missing filename

The file name for the required nfilename parameter was not

included.

NOTE

The old name must occur first and the new name must occur

second. REN will not allow two files to have the same name at the

same time, so you must use an intermediate name to switch the

names of two files. Never rename special files that application

programs require to operate.

------------------------------------------------------------------

[For related topics, press R]

SEE ALSO

ATTRIB Command

COPY Command

DEL (DELETE) and ERASE Commands

DIR Command

FORMAT Command

PRINT Command

REPLACE Command

SHARE Command

TYPE Command

VERIFY Command

XCOPY Command