Created
December 6, 2018 19:36
-
-
Save maptastik/64550a3b41bc8f3bc79a744de4b8cd85 to your computer and use it in GitHub Desktop.
Function that takes a list of shapefiles and adds them to a File Geodatabase
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import arcpy | |
def shp_to_fgdb(shps, out_fgdb): | |
if isinstance(shps, str): | |
shps = [shps] | |
for shp in shps: | |
out_fc_name = shp.split('\\')[-1].split('.')[0] | |
print('Working on {}...'.format(out_fc_name)) | |
arcpy.FeatureClassToFeatureClass_conversion(shp, out_fgdb, out_fc_name) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment