Rename Statement

Renames a file.

Syntax
Rename oldFileName, newFileName

Parameters

oldFileName
Specify a string expression for the file name and path to be renamed. See ChDisk for the details.
newFileName
Specify the new name to be given to the file specified by oldFileName. See ChDisk for the details.

Description
Changes name of specified file oldFileName to newFileName. If path is omitted, Rename searches for oldFileName in the current directory.

Rename is only enabled when oldFileName and newFileName are specified in the same drive.

A file may not be renamed to a filename that already exists in the same path.

Wildcard characters are not allowed in either oldFileName or newFileName.

See Also
Copy

Rename Statement Example
Example from the command window:

> Rename A.PRG  B.PRG