I see may versions of this post but none quite get me to where I need to be.
I have 50,000 features classes in a file geodb.
They are a1_xxxxx_xx
I need to rename them all to a6_xxxxx_xxx
This is my code. Does not seem to quite work. Does create many a6 but a1 still remain when it completes.
import arcpyfrom arcpy import *env.workspace = r"C:\IND_Rivers\New\Outputs\A3\a3_03.gdb"fcList = arcpy.ListFeatureClasses()#attempts to replace feature classes with "a1" with "a6" for fc in fcList: Rename_management(fc, fc.replace('a1','a6'))
أكثر...
I have 50,000 features classes in a file geodb.
They are a1_xxxxx_xx
I need to rename them all to a6_xxxxx_xxx
This is my code. Does not seem to quite work. Does create many a6 but a1 still remain when it completes.
import arcpyfrom arcpy import *env.workspace = r"C:\IND_Rivers\New\Outputs\A3\a3_03.gdb"fcList = arcpy.ListFeatureClasses()#attempts to replace feature classes with "a1" with "a6" for fc in fcList: Rename_management(fc, fc.replace('a1','a6'))
أكثر...