import arcpy import os fc =  walk = arcpy.da.Walk('C:/Wiley/P1/gis/OSM.gdb') outdir = "C:/Wiley/P1/gis/HK80.gdb/osm" for root, dirs, datasets in walk: for ds in datasets: fc.append(os.path.join(root, ds)) if fc: output = os.path.join(outdir, os.path.basename(ds) + "_project") hkfc = "C:\Wiley\P1\gis\HK80.gdb\Building_merge_dissolved" # Describe the feature class and get its spatial reference desc = arcpy.Describe(hkfc) spatialRef = desc.spatialReference out_coordinate_system = arcpy.SpatialReference('spatialRef.name') arcpy.Project_management(fc, output, out_coordinate_system)
I am sure with a trained eye you guys know what to do. It came back to me with the following error:
Runtime error Traceback (most recent call last): File "", line 21, in File "c:\program files (x86)\arcgis\desktop10.4\arcpy\arcpy\arcobjects\mixins.py", line 962, in init self._arc_object.createFromFile(item) RuntimeError: ERROR 999999: Error executing function.
What went wrong?