If you still can't get this external tool to use try the following script which do basicaly the same. You can then incorporate it in your script.import arcgisscripting, os
gp = arcgisscripting.create(9.3)
inputFC = r"Z:\TestSHP\geogrC001.shp"
fieldName ="C001"
outWorkspace = r"Z:\Work\TestSHPout"
filePrefix ="geor" + fieldName[1:] #eg. geor001
#find a type of declared field
fields = gp.ListFields(inputFC, fieldName)
fieldType = fields[0].Type
#create a list of values in declared field
valuesLst = []
searchCursor = gp.SearchCursor(inputFC, "", None, fieldName)
row = searchCursor.next()
while row:
valuesLst.append(row.getValue(fieldName))
row = searchCursor.next()
del searchCursor
#make the list unique
uniqueValuesLst = set(valuesLst)
#create new feature class for each unique value
for value in uniqueValuesLst:
#build output feature class path
outFCName = filePrefix + "_" + str(value)
outFC = os.path.join(outWorkspace, outFCName)
#build SQL WHERE clause depending :
if fieldType == "String":
whereClause = fieldName + " = '%s'" % value
else:
whereClause = fieldName + " = %s" %value
#extract values to new feature classes
gp.Select_analysis(inputFC, outFC, whereClause)