I want to construct a replace statement in my python script through the following python code below;
arcpy.CalculateField_management("Mainfb_Stage_P","AFileN","!ABFileN!","PYTHON_9.3","replace(ABFileN, "/","-")")
But i keep getting the error below;
Runtime error
Traceback (most recent call last):
File "<string>", line 1, in <module>
TypeError: unsupported operand type(s) for /: 'str' and 'str'
Anyone with a wonderful suggestion. Thanks
You might try:
arcpy.CalculateField_management("Mainfb_Stage_P","AFileN","!ABFileN!.replace('/','-')","PYTHON_9.3")
Thank you RANDY!!!! You are the best.....