I am trying to create a geodatabase with many (15000+) shapefiles in it. I have a folder with all the .shps, and I have an empty gdb. I have tried the feature class to geodatabase tool, but it hangs forever - over 45 minutes last time I tried it. What is the fastest way to do this?
Thanks!
Solved! Go to Solution.
You could try python:
import arcpy
arcpy.env.workspace = r"C:\shapefiles_workspace"
shapefileList = []
#Append shapefiles to list
for shapefile in arcpy.ListFeatureClasses("*"):
shapefileList.append(shapefile)
#Reference output File Geodatabase
out_location = r"C:\file_geodatabase_path\Data.gdb"
#Import Shapefiles
arcpy.FeatureClassToGeodatabase_conversion(shapefileList, out_location)
Hi Michael,
With 1500+ shapefiles, this may take a few hours depending on the size of all the shapefiles. I would recommend letting the Feature Class to Geodatabase run overnight and see if it completes by morning.
Will do - but actually the place it hangs isn't the tool operation, it's the selection of input features. I selected them all (shift click) but arcmap is not responding - that is, I can't click "add" if that makes sense.
You could try python:
import arcpy
arcpy.env.workspace = r"C:\shapefiles_workspace"
shapefileList = []
#Append shapefiles to list
for shapefile in arcpy.ListFeatureClasses("*"):
shapefileList.append(shapefile)
#Reference output File Geodatabase
out_location = r"C:\file_geodatabase_path\Data.gdb"
#Import Shapefiles
arcpy.FeatureClassToGeodatabase_conversion(shapefileList, out_location)
It's running, and pretty fast! Thanks!
Go with Python scripting as suggested by Jake if you have worked in Python.
Another alternative would be using Model Builder using iteration.
Examples of using iterators in ModelBuilder—Help | ArcGIS Desktop
Iterate Feature Classes—Help | ArcGIS Desktop
Hello Michael
Data Interoperability extension can help you, use a shapefile reader with a directory input and wildcard "*" and write to a single geodatabase feature class. If you can share data I can give you a sample tool. You can obtain an evaluation license of Data Interoperability.