Using this page as my resource: ArcGIS Help (10.2, 10.2.1, and 10.2.2)
I came up with this:
import arcpy
from arcpy import env
env.workspace = "C:\"
inTable = "c:\test.csv"
outLocation = "c:\test.dbf"
outTable = "test"
arcpy.TableToTable_conversion(inTable, outLocation, outTable)
However, it's failing:
Traceback (most recent call last):
File "c:\test.py", line 4, in <module>
arcpy.TableToTable_conversion("c:\test.csv", "c:\test.dbf", "test")
File "C:\Program Files (x86)\ArcGIS\Desktop10.1\arcpy\arcpy\conversion.py", line 1904, in TableToTable
raise e
ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000732: Input Rows: Dataset c:\test.csv does not exist or is not supported
ERROR 000732: Output Location: Dataset c:\test.dbf does not exist or is not supported
Failed to execute (TableToTable).
Is it clear where I'm going wrong?
Solved! Go to Solution.
Thanks for mentioning where "r\" doesn't work. Python is a lot deeper than I once thought! (and a deal more complicated)
The debate .... the options ....
This is related to the same effort, but specifically to the output... If need to start a new post, let me know...
In the resulting .dbf file, its creating a decimal with trailing zeroes:
750050
becomes
750050.00000000000
How can I avoid this?