<?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 add a word to the start of an Enterprise Geodatabase Feature Class using Python. in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/add-a-word-to-the-start-of-an-enterprise/m-p/1254367#M66767</link>
    <description>&lt;P&gt;I want to&amp;nbsp;add a word to the start of an Enterprise Geodatabase Feature Class using Python.&lt;/P&gt;&lt;P&gt;I have around 2000 feature classes which I need to append a word such as 'County' to the start.&amp;nbsp;&lt;/P&gt;&lt;P&gt;so at the moment, I have&lt;/P&gt;&lt;P&gt;&amp;lt;GDB&amp;gt;.DBO.Ambulance_Bay&lt;/P&gt;&lt;P&gt;what I want is&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;lt;GDB&amp;gt;.DBO.County_Ambulance_Bay.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have ArcGIS PRO 2.9 and would like to run this in the python window within ArcPRO.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help will be greatly appreciated, as this will save time than manually renaming each file.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 02 Feb 2023 16:13:55 GMT</pubDate>
    <dc:creator>TomDonovan-Brady1</dc:creator>
    <dc:date>2023-02-02T16:13:55Z</dc:date>
    <item>
      <title>add a word to the start of an Enterprise Geodatabase Feature Class using Python.</title>
      <link>https://community.esri.com/t5/python-questions/add-a-word-to-the-start-of-an-enterprise/m-p/1254367#M66767</link>
      <description>&lt;P&gt;I want to&amp;nbsp;add a word to the start of an Enterprise Geodatabase Feature Class using Python.&lt;/P&gt;&lt;P&gt;I have around 2000 feature classes which I need to append a word such as 'County' to the start.&amp;nbsp;&lt;/P&gt;&lt;P&gt;so at the moment, I have&lt;/P&gt;&lt;P&gt;&amp;lt;GDB&amp;gt;.DBO.Ambulance_Bay&lt;/P&gt;&lt;P&gt;what I want is&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;lt;GDB&amp;gt;.DBO.County_Ambulance_Bay.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have ArcGIS PRO 2.9 and would like to run this in the python window within ArcPRO.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help will be greatly appreciated, as this will save time than manually renaming each file.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Feb 2023 16:13:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/add-a-word-to-the-start-of-an-enterprise/m-p/1254367#M66767</guid>
      <dc:creator>TomDonovan-Brady1</dc:creator>
      <dc:date>2023-02-02T16:13:55Z</dc:date>
    </item>
    <item>
      <title>Re: add a word to the start of an Enterprise Geodatabase Feature Class using Python.</title>
      <link>https://community.esri.com/t5/python-questions/add-a-word-to-the-start-of-an-enterprise/m-p/1254393#M66769</link>
      <description>&lt;P&gt;A basic approach:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;# This will try to rename your feature classes, be sure that you really want that!

arcpy.env.workspace = "C:/your_database.sde"  # database connection of the data owner (dbo in your example)
for fc in arcpy.ListFeatureClasses() + arcpy.ListTables():
    name = fc.split(".")[-1]
    new_name = "County_" + name
    try:
        arcpy.management.Rename(fc, new_name)
    except Exception as e:
        print(f"Could not rename {fc} to {new_name}: {e}")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To filter what classes and tables you rename:&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/functions/listfeatureclasses.htm" target="_blank"&gt;ListFeatureClasses—ArcGIS Pro | Documentation&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/functions/listtables.htm" target="_blank"&gt;ListTables—ArcGIS Pro | Documentation&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Feb 2023 16:56:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/add-a-word-to-the-start-of-an-enterprise/m-p/1254393#M66769</guid>
      <dc:creator>JohannesLindner</dc:creator>
      <dc:date>2023-02-02T16:56:25Z</dc:date>
    </item>
    <item>
      <title>Re: add a word to the start of an Enterprise Geodatabase Feature Class using Python.</title>
      <link>https://community.esri.com/t5/python-questions/add-a-word-to-the-start-of-an-enterprise/m-p/1254418#M66771</link>
      <description>&lt;P&gt;Dear Johannes,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you so much for your help I tested out of PROD, and it has done exactly what I wanted. You have saved me so much time.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;</description>
      <pubDate>Thu, 02 Feb 2023 17:33:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/add-a-word-to-the-start-of-an-enterprise/m-p/1254418#M66771</guid>
      <dc:creator>TomDonovan-Brady1</dc:creator>
      <dc:date>2023-02-02T17:33:03Z</dc:date>
    </item>
  </channel>
</rss>

