Description
This tool renames fields in a table. It does this by creating a new field with the desired name, copying values from the old field into the new field, and then deleting the old field. The position of the field therefore changes. The field type of the new field is based on the input field.
This tool will only work with the simple field data types: short and long integers, double precision numbers, strings, etc. If you specify a field that is an object ID field or a geometry field then the tool will return an error message and no renaming will occur.
Syntax
field.rename(in, field, out);
| in | the input table or feature data source | |
| field | the name of the field to rename | |
| out | the new field name |
Example
field.rename(in="C:\data\plots.shp", field="LCOV1999", out="LANDCOV99");