I've been tasked with updating attribute table fields with file paths to image files in a folder based on a unique ID. I'm having trouble thinking up a script that will do this? I'm working on a standalone script in ArcGIS Pro 2.3.1 Arcpy.
This is an example of how the table should look. Every JPG has a unique ID that matches the Post_Number field unique ID. Currently, the paths to the JPGs are entered manually into the table, and there are 1000s of them.
I don't think a Calculate Field will work because not all JPGs are stored in the same directory. All I've done so far is create a cursor that searches the Post_Number and Photo fields.
#for each row print the fields
with arcpy.da.SearchCursor(fc, fields) as cursor:
for row in cursor:
print(u"{0}, {1}".format(row[0], row[1]))