I apologize for crossposting against the ESRI geoprocessing forum, but it seems like this one gets answers. I'd like to have a modified append tool (ArcToolbox) that takes multiple shapefiles with point attribute data, and copies the inputted shapefile's name(s) to a "filename" attribute column, and then appends it to a target dataset. That way I can track where the data came from. The only way I can think to do this is something along the lines of the following:
for each shp in featureclasses:
outFeatureClass = os.path.join("C:\GIS\Scripts\temp\temptrks", shp.strip(".shp"))
arcpy.CopyFeatures_management(shp, outFeatureClass)
arcpy.AddField_management(outFeatureClass, "filename", "TEXT", "","", "254")
arcpy.CalculateField_management(outFeatureClass, "filename", str(shp), "PYTHON")
Then perform the append for each file in the new workspace.
What I'd like to do is be able to have a user drag and drop multiple shapefiles from multiple directories into a Multiple Value input box (like that in the Append tool).
I have two questions:
- Is there an easier/better way to perform the task?
- If not, what should I set the parameter type to (Multiple Value is not a selection).
Any advice is appreciated. Thank you all
