import arcpy sde1 = r"D:\sde_transit\sde1.gdb" output = r"C:\Users\coylema\AppData\Roaming\ESRI\Desktop10.0\ArcCatalog\Connection to winms-wooddb.sde" #output = r"D:\sde_transit\sdeCSRS.gdb" arcpy.env.workspace = r"D:\sde_transit\sde1.gdb" sdeList = arcpy.ListFeatureClasses() for fc in sdeList: result = arcpy.GetCount_management(fc) count1 = result.getOutput(0) fc2 = output+"\\TFM_BKG."+fc if arcpy.Exists(fc2): result = arcpy.GetCount_management(fc2) count2 = result.getOutput(0) if count1 == count2: print fc+" OK" else: print "Problem with "+fc print count1 print count2 else: print fc2+" not found" pass # Clean up sdeList = None del arcpy.env.workspace del arcpy
import arcpy MasterDataset = arcpy.GetParameterAsText (0) fcs = arcpy.GetParameterAsText (1) arcpy.env.workspace = MasterDataset fclist = arcpy.ListFeatureClasses() for fc in fcs: if fc in fclist: arcpy.Delete_management(fc, "FeatureClass")
import arcpy MasterDataset = arcpy.GetParameterAsText (0) fcs = arcpy.GetParameterAsText (1) arcpy.env.workspace = MasterDataset fclist = arcpy.ListFeatureClasses() arcpy.env.workspace = fcs fcslist = arcpy.ListFeatureClasses() for fc in fcslist: if fc in fclist: arcpy.Delete_management(fc)