Bulk Convert DBF To CSV In A Folder ArcGIS 10.1 Using Python
Answer : I have only tested this very briefly (and with a limited variety of data), but this script demonstrates one way this might be accomplished: import arcpy import csv import os import codecs import cStringIO def batch_convert_dbf_to_csv(input_dir, output_dir, rename_func=None): """Converts shapefiles and standalone DBF tables within the input directory input_dir to CSV files within the output directory output_dir. An optional function rename_func may be used to manipulate the output file name.""" # Set workspace to input directory arcpy.env.workspace = input_dir # List shapefiles and standalone DBF tables in workspace tables = list_tables() # Only proceed if there actually exists one or more shapefiles or DBF tables if tables: # Create output directory structure make_output_dir(output_dir) # Loop over shapefiles and DBF tables for table in tables: # Generate ...