Welcome to jBASE's new documentation site! Many answers to your questions can be found by searching the Knowledgebase or viewing the jBASE Documentation. We also have a Google Group for peer discussion about jBASE. If you are unable to find the information you are looking for, jBASE Support will be glad to assist in resolving your technical problems. Enjoy and please provide comments and feedback .

How can we help you?

RENAME-FILE

Description 

The RENAME-FILE command allows the user to rename a file, its dictionary and its associated control file* with a single command.

 The command takes the general form: 

RENAME-FILE filename

 where filename is the name the file to be renamed. The file type must be one of the supported jBASE file types.

* A control file is the file ending in ]I and is created when an index or trigger is created on the main file. Thus, the name of the control file will be the filename]I where filename is the name of the file.

Note: 

RENAME-FILE doesn't require a '(' when specifying the destination file name.  The destination file name must not exist or the rename will fail. 

RENAME-FILE assumes that the dictionary section of the specified file exists. The command will fail if it cannot open the dictionary section. It will rename the data section and the dictionary section. If you only want to move the data or dictionary portion of a file, use jmv.

RENAME-FILE calls an internal function to perform the rename. If transaction journaling is active, the rename is logged as a MOVEFILE transaction.

RENAME-FILE does not work on files that contain operating system meta-characters (e.g. "SALES*MAR").

 

EXAMPLES

An example of use may be as: 

RENAME-FILE File1
TO:New.File1

Renamed file .\File1 to .\New.File1
Renamed file .\File1]I to .\New.File1]I
Renamed file .\File1]D to .\New.File1]D

Renames the file File1, its dictionary and its control file to New.File1

Was this article helpful?