<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Add a features file name to its attribute table? in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/add-a-features-file-name-to-its-attribute-table/m-p/96590#M3340</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You'd have to do something like&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
# get the shapefile name

n = arcpy.Describe(shp).name

# open an update cursor

ucur = arcpy.UpdateCursor(shp)

for urow in ucur:
&amp;nbsp;&amp;nbsp;&amp;nbsp; urow.FCNAME = n # assuming a field called FCNAME exists
&amp;nbsp;&amp;nbsp;&amp;nbsp; ucur.updateRow(urow)

&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 06:04:46 GMT</pubDate>
    <dc:creator>SolomonPulapkura</dc:creator>
    <dc:date>2021-12-11T06:04:46Z</dc:date>
    <item>
      <title>Add a features file name to its attribute table?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/add-a-features-file-name-to-its-attribute-table/m-p/96589#M3339</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm wondering if there is a way to populate an attribute field for a feature with that features name?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a series of about a thousand polygons as shape-files. The attributes for each are identical, ID 0. But the names are unique, in fact each name encodes 3 attribute values for each feature. I need to merge all of these features into a single feature class but maintain the unique name for each in the new attribute table (to later be parsed into separate fields). Is there a tool or script for adding the name of a feature to its table?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Aug 2012 17:24:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/add-a-features-file-name-to-its-attribute-table/m-p/96589#M3339</guid>
      <dc:creator>DavidMedeiros</dc:creator>
      <dc:date>2012-08-14T17:24:24Z</dc:date>
    </item>
    <item>
      <title>Re: Add a features file name to its attribute table?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/add-a-features-file-name-to-its-attribute-table/m-p/96590#M3340</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You'd have to do something like&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
# get the shapefile name

n = arcpy.Describe(shp).name

# open an update cursor

ucur = arcpy.UpdateCursor(shp)

for urow in ucur:
&amp;nbsp;&amp;nbsp;&amp;nbsp; urow.FCNAME = n # assuming a field called FCNAME exists
&amp;nbsp;&amp;nbsp;&amp;nbsp; ucur.updateRow(urow)

&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 06:04:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/add-a-features-file-name-to-its-attribute-table/m-p/96590#M3340</guid>
      <dc:creator>SolomonPulapkura</dc:creator>
      <dc:date>2021-12-11T06:04:46Z</dc:date>
    </item>
  </channel>
</rss>

