RENAME
Rename File
This directive renames a file without changing its characteristics or position on its logical disk.
Syntax
Section titled “Syntax”RENAME [disk-num,] old-file-name, new-file-name[,ERR=line-ref|,ERC=error-code]disk-num- is an integer in the range of 0 to 35 indicating the logical disk directory in which this file resides. Starting with release level 8.1B2, disk-num is optional. In prior releases disk-num is mandatory.
old-file-name- is any string specifying the name of the file to be renamed.
new-file-name- is any string specifying the new name for the file.
line-ref- is the program line number or label to branch to if this directive produces an error.
error-code- is a programmer-defined error code. Valid values are positive or negative whole numbers.
Remarks
Section titled “Remarks”This directive renames the old file and erases the logical disk directory reference to the old file name.
Examples
Section titled “Examples”RENAME 2, "DCINDX", "INDXPM"changes the name of the file DCINDX on logical disk directory 2 to INDXPM.
RENAME DISK_NUM, OLD_NAME$, NEW_NAME$If DISK_NUM = 2, OLD_NAME$ = “DCINDX” and NEW_NAME$ = “INDXPM” this statement changes the name of the file DCINDX on logical disk directory 2 to INDXPM.
See also
Section titled “See also”DELETE directive
From the Thoroughbred Basic Language Reference, Volume III: R–Z, version 8.9.1. Open this page in the PDF