Accessing multiple shapefiles in folder using Python and ArcGIS for Desktop?

المشرف العام

Administrator
طاقم الإدارة
I have been asked to create a custom script to reproject shapefiles (different projections) from a folder, but can't contain values such as filenames and path names to access them.

I have started with Batch Project script and tried to set the input parameter as 'folder' but get the error 000840: The value is not a dataset, because the input values needs to be feature class or dataset.

I have also searched the forum and found:

How do I use python to batch process the reprojection of a group of shapefiles?

But obviously this answer contains values. I have also tried setting;

Set workspace environment;

arcpy.env.workspace = arcpy.GetParameterAsText(0)Doesn't appear to work.

It is now working after I changed my code from:

arcpy.env.workspace = arcpy.GetParameterAsText(0)to:

arcpy.env.workspace = arcpy.ListFeatureClasses()

أكثر...
 
أعلى