Can anybody anyone point me to directions on how to convert file geodatabase feature class names to lower case by using Python?
Using a combination of string manipulation and renaming the feature classes using
arcpy.Rename_management works, sort of.
There's an odd problem with doing this directly. Since your output and input names are technically the same in ArcMap's opinion (this is apparently one of its operations that's case insensitive), it will complain if you just convert them directly.
fcList = arcpy.ListFeatureClasses() for fcName in fcList: fcLCName = fcName.lower() arcpy.Rename_management(fcName, fcLCName, 'FeatureClass')
However, you can work around this by renaming to a dummy variable first, and then converting that to the actual lowercase name...
arcpy.Rename_management(fcName, 'TEMPNAME', 'FeatureClass') arcpy.Rename_management('TEMPNAME', fcLCName, 'FeatureClass')
You could do this by copying each featureclass with a new name, though this could take some time if there are many or if they are large datasets. This may not be the most elegant solution, but it should work:
import arcpy,os arcpy.env.workspace = r'c:\geodatabase.gdb' arcpy.CreateFileGDB_management(r'c:','geodatabase_lowercase.gdb') for fc in arcpy.ListFeatureClasses('*'): arcpy.CopyFeatures_management(fc,os.path.join(r'c:\geodatabase_lowercase.gdb',fc.lower()))