Hi,I adapted some code I found online to search for broken (moved or renamed) hyperlinks in a shapefile. It should write all broken links to a text file, but instead it is writing ALL the hyperlinks to the text file. Any advice on what to change? I know extremely little about python. Also, I have arcmap 10.1thank you!import arcpy
import os
fc = r" C:\Users\GIS\Documents\TEST 2-25\project_test.shp"
fields = ["PROJECT_DW"]
with arcpy.da.SearchCursor (fc,fields) as cursor:
for row in cursor:
Roll = str(row[0])
if os.path.exists(Roll):
pass
else:
f = open(r"C:\Users\GIS\Documents\brokenlinks.txt","a")
f.write(Roll + os.linesep)
f.close()