Looks like I got it to work. I ended up creating the schema for the CSV that forced the formatting I wanted as suggested and then I put it in a temp folder. I pulled the CSV from the input folder and renamed it temp_file.csv and put it in the temp folder with the schema. I then did the processing on that file which fixed any problems with formatting. I then move the file to the backup folder and delete the input and temp file. Seems to work like a charm. Here's what it looks like (I'm having to retype this from another computer network so if I fat finger something, sorry)
# Import system modules...
import sys, os, re, shutil, arcgisscripting
# Create the Geoprocessor object...
gp=arcgisscripting.create()
# Load Required Toolboxes...
gp.AddToolbox(toolbox path)
# Variables...
input_folder = folder path
coordinate_format_type = "DMS 2 Field"
coordinate_field_1 = "Lat"
coordinate_field_2 = "Lon"
backup = folder path
output_folder = folder path
def table_convert(input_folder):
for dirpath, dirnames, names in os.walk(input_folder, topdown=True):
for doc in names:
try:
output_file = os.path.join(backup, doc)
temp_file = os.path.join(temp_folder, �??temp_file.csv�?�)
input_file = os.path.join(dirpath, doc)
output_feature_class = os.path.join(output_folder, doc_split.group(1) + �??.shp�?�)
doc_split = re.search ("(.*)(\..*)", doc
if doc_split.group(2) == ".csv":
shutil.copy(input_file, temp_file)
gp.TableToPoint_ma(temp_file, output_feature_class, "DMS 2 Field", coordinate_field_1, coordinate_field_2, "", "", "")
shutil.copy(temp_file, output_file)
os.remove(input_file)
os.remove(temp_file)
except:
gp.addmessage("Error in Process")
# Process...
table_convert