RENAME Verb - Rename File

Syntax

RENAME fileidA TO fileidB{,MODE=string}{,ERR=lineref}
RENAME fileidA, fileidB{,MODE=string}{,ERR=lineref}

Description

The RENAME verb renames a file without altering its contents. It can be used to move files from one directory to another.

Parameter

Description

fileidA

Original file name. It must be lockable.

fileidB

New file name. Any prefix used to locate fileidA is transferred to fileidB.

MODE=string

Use the MODE="CISAM" option to rename a C-ISAM file.

ERR=lineref

Branch to be taken if an error occurs during execution.

The interpreter issues an error if fileidA does not exist or if the new name already exists.

Examples

1020 RENAME "PROG1" TO "PROGA",ERR=2000

See Also

Data Server Syntax

Verbs - Alphabetical Listing