Using this page as my resource: ArcGIS Help (10.2, 10.2.1, and 10.2.2)
I came up with this:
<SPAN class="kn">import</SPAN> <SPAN class="nn">arcpy</SPAN><BR /><SPAN class="kn">from</SPAN> <SPAN class="nn">arcpy</SPAN> <SPAN class="kn">import</SPAN> <SPAN class="n">env</SPAN><BR /> <BR /><SPAN class="n">env</SPAN><SPAN class="o">.</SPAN><SPAN class="n">workspace</SPAN> <SPAN class="o">=</SPAN> <SPAN class="s">"C:\"</SPAN><BR /> <BR /><SPAN class="n">inTable</SPAN> <SPAN class="o">=</SPAN> <SPAN class="s">"c:\test.csv"</SPAN><BR /><SPAN class="n">outLocation</SPAN> <SPAN class="o">=</SPAN> <SPAN class="s">"c:\test.dbf"</SPAN><BR /><SPAN class="n">outTable</SPAN> <SPAN class="o">=</SPAN> <SPAN class="s">"test"</SPAN><BR /> <BR /><SPAN class="n">arcpy</SPAN><SPAN class="o">.</SPAN><SPAN class="n">TableToTable_conversion</SPAN><SPAN class="p">(</SPAN><SPAN class="n">inTable</SPAN><SPAN class="p">,</SPAN> <SPAN class="n">outLocation</SPAN><SPAN class="p">,</SPAN> <SPAN class="n">outTable</SPAN><SPAN class="p">)</SPAN>
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?