I have a point feature with a field containing names of 3D models (tree1). In a folder with subfolders i have the 3D models (c:\models\tree1.p3d).
I need to find the full path of every 3D model in my feature and put it in a new field (ModelFullPath = c:\models\tree1.p3d)
I have the script to iterate the fields and the script to search the folders but i am having a hard time combining the two.
fc = 'C:/feature.shp'
fields = ['ModelName']
with arcpy.da.SearchCursor(fc, fields) as cursor:
for row in cursor:
name = "tree1"
for root, dirs, files in os.walk("C:\models"):
for file in files:
if file.endswith(name +".p3d"):