AnsweredAssumed Answered

Extracting selected characters from filename and inserting into attribute table

Question asked by spk578 on Jan 18, 2012
Latest reply on Jan 18, 2012 by spk578
Hello,

I have come across a problem and with my limited exposure to scripting I have come to a dead end and nesome help.

The problem is: I have several thousand shapefiles (delivered from our draftsman) which have filenames similar to this:

Map64a_polyline
Map78d_polygon


I need to add the 4th, 5th, and 6th characters of the filename (e.g. 64a) to the attribute table (I have all ready used model builder to create a new field) under the field name: "MapNumber"
Once this is done I can easily join a table and copy features to feature class and will have populated my attribute tabe quite nicely.

Does anyone have any ideas?

Thanks for you help,

Outcomes