RENAME command

Renames an Analytics project item or a file.

Syntax

RENAME item_type name <AS|TO> new_name <OK>

Parameters

Name Description
item_type name

The type and name of the project item or file that you want to rename.

Note

In most cases, you cannot rename an item or file if it is active, open, or in use.

Specify one of the following valid types:

  • FIELD physical data field, computed field, or variable
    • The table containing the field must be open. However, the active view cannot include the field.
    • You cannot rename a field that is referenced by a computed field.
  • FORMAT Analytics table
  • INDEX index
  • REPORT report or view
  • WORKSPACE workspace
  • SCRIPT (or BATCH) script
  • DATA Analytics data file (.fil)
  • FILE data file in the file system
  • LOG Analytics log file (.log)
  • TEXT text file

AS | TO new_name

The new name for the project item or file.

Note

Length limitations apply to most Analytics project item names. For more information, see Character and size limits in Analytics.

OK

optional

Deletes or overwrites items without asking you to confirm the action.

Examples

Renaming a field

You need to rename the ProdNo field to ProdNum. You use OK to perform the action without additional confirmation:

OPEN Inventory
RENAME FIELD ProdNo AS ProdNum OK