# Import your modules, arcpy is assuming you are running ArcGIS 10x import arcpy, sys, os, fileinput, glob, string from arcpy import env # Get a directory as an argument from the user. This directory is where your shapefiles are workingDirectory = sys.argv[1] # This sets your workspace as the user defined working directory env.workspace = WorkingDirectory #This establishes the variable featureClass as a list of shapefiles using the arcpy command ListFeatureClasses featureClass = arcpy.ListFeatureClasses() # For loop to iterate over every shapefile in the workingDirectory that is referenced as the variable featureClass for shapefile in featureClass: arcpy.AddMessage(shapefile)
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.