Select to view content in your preferred language

How to convert e00 to shp by command?

1527
4
08-12-2010 12:11 AM
bangqianchen
Emerging Contributor
I want to convert many e00 files to shapfiles by commends, can you give me an example of "import_arc" or "QuickImport" command? both of them were failed on my PC.

I also posted a thread in the sub-forum of ArcGIS Desktop - General,  however, nobody replied! Here is the adress.
http://forums.arcgis.com/threads/9067-Why-the-convertion-failed-%28-E00-gt-shp-%29
0 Kudos
4 Replies
BradPosthumus
Frequent Contributor
Do you have ArcInfo Workstation installed as well as ArcGIS? If so you have another toolbox at your disposal called "Coverage Tools", typically found in this directory: C:\arcgis\arcexe9x\Toolboxes.

There's a tool called "Conversion->To Coverage->Import From Interchange File" that will do what you want. Its help file has the following Python example:

import arcgisscripting
gp = arcgisscripting.create()

gp.workspace = "c:/workspace"
gp.toolbox = "arc"
gp.import("auto", "tracts.e00", "tracts")
0 Kudos
BradPosthumus
Frequent Contributor
I haven't tried the QuickImport command before but it seems to work as well, but you need to have access to the Data Interoperability extension. The code below converts all E00 files in a directory to shapefiles.

import arcgisscripting, os

gp = arcgisscripting.create()
gp.CheckOutExtension("DataInteroperability")

# Directory containing E00 files
strE00Directory = "C:/temp"
# Temporary Geodatabase required for QuickImport
strTempGdb = strE00Directory + "/tempOutput.gdb"

# loop through list of files in the E00 directory
for strFile in os.listdir(strE00Directory):
    if strFile.endswith(".e00"):
        print "Extracting " + strFile + "..."
        # convert E00 to file geodatabase feature class
        gp.QuickImport(strFile, strTempGdb)
        # Set the workspace to the gdb, loop through all of the extracted feature classes
        #   and create a shapefile from each.
        gp.workspace = strTempGdb
        objDatasets = gp.listfeatureclasses()
        objDataset = objDatasets.next()
        while objDataset:
            strOutputFile = strE00Directory + "/" + objDataset + ".shp"
            print "Creating " + strOutputFile + "..."
            gp.copyfeatures_management(objDataset, strOutputFile)
            objDataset = objDatasets.next()
        # delete the temp gdb since QuickImport requires a new gdb each time its run
        gp.delete_management(strTempGdb)
0 Kudos
DavidWynne
Esri Contributor
I want to convert many e00 files to shapfiles by commends, can you give me an example of "import_arc" or "QuickImport" command? both of them were failed on my PC.

I also posted a thread in the sub-forum of ArcGIS Desktop - General,  however, nobody replied! Here is the adress.
http://forums.arcgis.com/threads/9067-Why-the-convertion-failed-%28-E00-gt-shp-%29


Try downloading and using this tool:
http://resources.esri.com/geoprocessing/index.cfm?fa=codeGalleryDetails&scriptID=16535


-Dave
0 Kudos
bangqianchen
Emerging Contributor
Why not creating a batch conversion tools? Especially for directory to directory conversion.
0 Kudos