I'm simply trying to loop through the first immediate set of folders in a directory, then the GDB's, and finally the feature classes. I've seen examples of arcpy.da.walk and os.walk but it ends up going through every file but never sees the feature classes.
import arcpyimport osrootdir = r'\\server\test\ARCHIVE\\'for subdir in os.listdir(rootdir): databases = arcpy.ListWorkspaces("*", "FileGDB") for database in databases: fcList = arcpy.ListFeatureClasses() for fcName in fcList: fcLCName = fcName.lower() arcpy.Rename_management(fcName, 'TEMPNAME', 'FeatureClass') arcpy.Rename_management('TEMPNAME', fcLCName, 'FeatureClass')
أكثر...
import arcpyimport osrootdir = r'\\server\test\ARCHIVE\\'for subdir in os.listdir(rootdir): databases = arcpy.ListWorkspaces("*", "FileGDB") for database in databases: fcList = arcpy.ListFeatureClasses() for fcName in fcList: fcLCName = fcName.lower() arcpy.Rename_management(fcName, 'TEMPNAME', 'FeatureClass') arcpy.Rename_management('TEMPNAME', fcLCName, 'FeatureClass')
أكثر...