RENAME

Description

Rename or move a file.

Syntax

RENAME path-1 path-2

path is as follows:

{[[drive:]\directory\...\]filename[.extension]}

To move a file, specify a different directory for path-2 (the drive must be the same). When you move a file, you can also rename it (optionally). To do so, specify a new file name and/or extension.

Examples

  • Rename the file Test.ncp to Test.xyz:

    RENAME Test.ncp Test.xyz
  • Move the file Test.ncp to the directory \SAG\NCP:

    RENAME Test.ncp \SAG\NCP\Test.ncp
  • Move the file Test.ncp to \SAG\NCP and rename it to Down.ncp:

    RENAME Test.ncp \SAG\NCP\Down.ncp

Variables Returned

#RC (SUCCESS if RENAME was successful. FAILURE if RENAME was not successful.)

Related Commands

ERASE

Usage

Procedure File: Yes
Command Line: No
Key: No
API: No