Advertisement
Guest User

Untitled

a guest
Dec 11th, 2016
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. import arcpy
  2. from arcpy import env
  3.  
  4. env.workspace = "C:/data"
  5. arcpy.CopyRows_management("accident.dbf", "C:/output/accident2.dbf")
  6. arcpy.DeleteRows_management("C:/output/accident2.dbf")
  7.  
  8. # Set the workspace.
  9. arcpy.env.workspace = "C:/work/vancouver.gdb"
  10.  
  11. # Get a list of all the tables.
  12. tableList = arcpy.ListTables()
  13.  
  14. # Loop through the list and run truncate
  15. for table in tableList:
  16. arcpy.TruncateTable_management(table)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement