My code
import arcpy, os, shutil, re
from arcpy import env
arcpy.env.workspace = "R:\GIS_Data\Earthquake_Data\Updates\Eq_updates.mdb"
path = r"R:\GIS_Data\Earthquake_Data\Updates"
In_path = r"R:\GIS_Data\Earthquake_Data\Updates\OGS_Auto_Updates\csv"
Out_path = r"R:\GIS_Data\Earthquake_Data\Updates\OGS_Auto_Updates\dbf_new"
#gdb_name = r"R:\GIS_Data\Earthquake_Data\Updates\Eq_updates.mdb"
connect = "\\"
# convert csv to dbf in a separate folder
# Local variables inputs and outputs: filenames
for filenames in os.listdir(In_path):
arcpy.TableToTable_conversion(filenames, r"R:\GIS_Data\Earthquake_Data\Updates\Eq_updates.mdb", os.path.splitext(filenames)[0] + ".dbf")
print("Successfully converted" + os.path.splitext(csv)[0] + ".csv to " + os.path.splitext(csv)[0] + ".dbf")
The error:
File "C:\Program Files (x86)\ArcGIS\Desktop10.5\ArcPy\arcpy\conversion.py", line 2249, in TableToTable
raise e ExecuteError: Failed to execute. Parameters are not valid. ERROR 000732: Input Rows: Dataset 2000-2009.csv does not exist or is not supported Failed to execute (TableToTable).
Am I missing a import or other command?