import arcpy import os # Set Workspace env.workspace = r"Database Connections\GENERAL_DATA - PROD.sde" # List Feature Classes fcList = arcpy.ListFeatureClasses("MGISP.GISONEAST*") # Loop through each feature class for fc in fcList: # move features from sde to gis01 arcpy.FeatureClassToFeatureClass_conversion(fc, os.path.join(output_folder, my_dir, my_gdb), fc[16:], "")
fc.lstrip("MGISP.GISONEAST")