Bulk field renaming in file geodatabase?

You can use a Python script to do the heavy work for ya:

Check this out and adapt it to your needs. Needless to say, this is not tested, and don't use it on production data WITHOUT MAKING A BACKUP FIRST.

import arcgisscripting

gp = arcgisscripting.create(9.3)

gp.Workspace = "path_to_your_geodatabase"

# you can use absolute path to this function
gp.AddToolbox("management")

featureClasses = gp.ListFeatureClasses("*","ALL")

for featureClass in featureClasses:
    fields = featureClass.ListFields("*","ALL")

    for field in fields:

        # do not duplicate oid and geometry fields
        if field.Type == "OID" or field.Type == "Geometry":
            continue

        # lets refactor our field name
        # this transforms A_B_C into C
        fieldNames = field.Name.split("_")
        del(fieldNames[0:1])

        # add a new field using the same properties as the original
        # field
        gp.AddField(featureClass,fieldNames[0],field.Type)

        # calculate the values of the new field
        # set it to be equal to the old field
        gp.CalculateField(featureClass,fieldNames[0],field)

        # delete the old fields
        gp.DeleteField(featureClass,field)

I did not tested it, so test it and let me know if it works. If you need to change the name of the field in a different way, just alter the refactor part.


I don't believe anyone has mentioned this yet, but a very simple way to rename fields is to use the Make Table/Feature Layer in the Data Management toolbox.

Make Feature Layer Dialog Box Using this tool, you can specifiy a new name for your fields and then use the Copy Rows tool to create your new table with the appropriate field names.

Note: I know this works in ArcGIS10, but I cannot confirm the same functionality in 9.x


ET_GeoWizards lets you do bulk renames on featureclass fields in fGDBs. Can also change the data type and do bulk deletes as well.

However, you have to do it on one Feature class at a time.

It would not be too hard to put together some VBA/Python to perhaps achieve this. All depends on if the time to develop the code outweighs the time to manually doing it with an approach like using ET-GW