I'm trying to convert tab files to shape files. Issue is my code below converts only the last tab file in the os.walk list and not all the others. No python errors are reported and output prints the list of tab file paths below. Can anybody see something wrong as to why Quickimport converts one tab file and not the others?
C:/temp\Boundary.TAB C:/temp\circle.TAB C:/temp\square.TAB etc,
import arcpy
import os
path = "C:/temp1"
for root, dirs, files in os.walk(path,topdown=False):
for file in files:
if file.endswith(".TAB"):
table = os.path.join(root, file)
print(table)
output = "C:/temp1/results.gdb"
arcpy.QuickImport_interop(table, output)
*.TAB
files if it works for one. Using a picture, what do the contents ofC:\temp1
look like in Windows Explorer?C:\temp1
so what is output in yourC:\temp1\Results.gdb and by the print statement when you run the code snippet you have presented with just the value of
path` changed?