I have a geodatabase including (cnty06,cnty07,cnty08,cnty09...) that I'd like to rename to (c06,c07,c08,c09...). I can use the ModelBuilder (or script from ModelBuilder) to complete this task. Is there a way to use Python to complete the same task?
If they are all have the same name schema then you should be able to do the following:
import arcpy arcpy.env.workspace = 'LOCATION OF THE GDB' fcs = arcpy.ListFeatureClasses("*cnty*","") for fc in fcs: arcpy.Rename_management(fc, "%s%s" % (fc[0:1],fc[-2:]))