I want to use create random point tool on list of shapefiles, but keep failing to list the shape files. My code stops at line (print fcList); and gives me "None" as output.
Is it because of the version of ArcGIS?
I am using ArcGIS 10.6 Version.
The code successfully works, and creates random points for a single shapefile.
import arcpy import os from arcpy import env from arcpy.sa import * env.overwriteOutput = True arcpy.CheckOutExtension("Spatial") arcpy.env.workspace= "C:/Users/ru/Desktop/Project" outpath = "C:/Users/ru/Desktop/Project/points" fcList = arcpy.ListFeatureClasses() print fcList for fc in fcList: cursor = arcpy.da.SearchCursor(fc, ["num_pt"]) with arcpy.da.SearchCursor(fc, ["num_pt"]) as cursor: for row in cursor: num = row arcpy.CreateRandomPoints_management(outpath, "sa.shp"+ str(num), fc, "", num) del row del cursor print "points created"