iCloud Calendar sync error 400 on OS X 10.10.2
An arcpy/python way to find like named layers in a gdb would be to use the string .find()
method, see example below:
import os
commonSearchText = ['207900045', 'xyz', '1234']
workspace = "C:/Temp/New File Geodatabase.gdb"
for nameX in commonSearchText:
foundLayersList = []
walk = arcpy.da.Walk(workspace, datatype="FeatureClass")
for dirpath, dirnames, filenames in walk:
for filename in filenames:
found = filename.find(nameX)
if found >-1:
foundLayersList.append(os.path.join(dirpath, filename))
# next do something with two found layers in the foundLayers list....
Alternatively, you could do this in one line combining the if condition and in method:
# same code as noted above before walk statement
walk = arcpy.da.Walk(workspace, datatype="FeatureClass")
for dirpath, dirnames, filenames in walk:
for filename in filenames:
if commonSearchText in (filename):
foundLayersList.append(os.path.join(dirpath, filename))
# ....
You could put all your common names in the commonSearchText list and loop over those if all layers are in one gdb.