I'm not only new to Python, but also to ArcGis and I'm quite stuck trying to create a script to batch convert .e00 files to .shp files.
I've started working with a script that I found in this very own site, but I'm not able to make it work properly. It seems that the first part of the code, where the conversion to coverage files is made, runs fine, but the second part, where the conversion to .shp files should be made, doesn't work. It just does anything.
I don't get any traceback erros. Could you please give me a hint?
import arcpy, os
arcpy.env.overwriteOutput = True
arcpy.env.workspace = ws = r'C:\in'
out = r'C:\out'
if not os.path.exists(out):
for cov in arcpy.ListFiles('.e00'):
arcpy.ImportFromE00_conversion(cov, ws, cov.split('.'))
print 'Converted %s' %cov
for cov in arcpy.ListFiles():
if not '.e00' in cov and cov != 'info':
arcpy.env.workspace = os.path.join(ws,cov)
for fc in arcpy.ListFeatureClasses('*polygon'):
shp = os.path.join(out, '%s.shp' %cov)
print 'Converted Coverage to %s' %shp
Thank you so much in advance.