AnsweredAssumed Answered

I want to create a folder using an attribute value from a feature

Question asked by GISGURU_001 on Jul 30, 2013
Latest reply on Aug 1, 2013 by mzcoyle
This is my code and the error message received also

mxd = arcpy.mapping.MapDocument("Current") df = arcpy.mapping.ListDataFrames(mxd)[0] fc = "Parcels" field = "StateName" cursor = arcpy.SearchCursor(fc)  for row in cursor:  val = row.getValue(field) arcpy.CreateFolder_management("C:\\"+ "\\" + Str(val) + "\\")  Runtime error  Traceback (most recent call last):   File "<string>", line 1, in <module>   File "C:\Program Files (x86)\ArcGIS\Desktop10.1\arcpy\arcpy\management.py", line 14477, in CreateFolder     raise e ExecuteError: Failed to execute. Parameters are not valid. ERROR 000735: Folder Name: Value is required Failed to execute (CreateFolder).


Any suggestions?

Outcomes