Renaming a shapefile using values from a text field

Discussion created by peter.dalrymple on Feb 20, 2013
Latest reply on Feb 22, 2013 by jskinner-esristaff
Does anyone know how I might create a python script that would use an attribute value from a table and use that value as a file name prefix when renaming a shapefile?

For example, as part of my script I have converted a time field such that it contains no back slashes and can be used as a unique file name. Now that I have a field with the unique text I would like to rename a generic shapefile using the date text as a prefix inorder to make the file name unique.

For further clarification, the input file is always "generic.shp" and the desired output would look something like this, "02202013_generic.shp" based upon what date is used in the date field.

Any help would be appreciated.