Export individual rows

Discussion created by scoggins on Aug 19, 2012
Latest reply on Aug 19, 2012 by mzcoyle

I'm trying to write a script that runs through an attribute table for a polygon shapefile. I want to select each row in the table and output each as a separate file. I have got as far as a search cursor and can export the first row. However, I'm unsure how to use Python to give each file a unique name. So the first file will be called row1.shp, the script then fails because I can't set it up to iterate the filename. How do I use Python to give the next file the name "Row2.shp" and so on and so forth until the last row? At the moment i have a test file with 5 polygons, my dataset actually has over 6000 rows.

Thanks in advance