<?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: Remove Special Characters from Geo database Feature Classes in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/remove-special-characters-from-geo-database/m-p/1254890#M66792</link>
    <description>&lt;LI-CODE lang="python"&gt;import arcpy

arcpy.env.workspace = "c:/data/gdb.gdb"

for fc in arcpy.ListFeatureClasses():
    if "_" in arcpy.Describe(fc).name:
        arcpy.management.Rename(fc, arcpy.Describe(fc).name.replace('_', '',))&lt;/LI-CODE&gt;</description>
    <pubDate>Fri, 03 Feb 2023 16:17:04 GMT</pubDate>
    <dc:creator>DannyMcVey</dc:creator>
    <dc:date>2023-02-03T16:17:04Z</dc:date>
    <item>
      <title>Remove Special Characters from Geo database Feature Classes</title>
      <link>https://community.esri.com/t5/python-questions/remove-special-characters-from-geo-database/m-p/1254458#M66773</link>
      <description>&lt;P&gt;Hello, I am using ArcPRO 2.9, and I would like to run this script within the python window in ArcPRO. I have a lot of Geodatabase Feature Classes that have a '_' in various places in the file name. Is there a way with Python to remove '_'? Unfortunately, they are not in the same place; most online help I have found refers to a specific character being replaced.&amp;nbsp;&lt;/P&gt;&lt;P&gt;So currently, I have&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;lt;GDB_Name&amp;gt;.DBO.B_H_Limited_Waiting_M_S_8AM_6PM.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want it to look like this&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;lt;GDB&amp;gt;.DBO.BHLimitedWaiitngMS8am6pm.&lt;/P&gt;&lt;P&gt;I do not need to keep any '_', so they can all be removed.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help, I would be most grateful.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tom&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Feb 2023 17:59:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/remove-special-characters-from-geo-database/m-p/1254458#M66773</guid>
      <dc:creator>TomDonovan-Brady1</dc:creator>
      <dc:date>2023-02-02T17:59:35Z</dc:date>
    </item>
    <item>
      <title>Re: Remove Special Characters from Geo database Feature Classes</title>
      <link>https://community.esri.com/t5/python-questions/remove-special-characters-from-geo-database/m-p/1254848#M66789</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;gdbname = r'&amp;lt;GDB_Name&amp;gt;.DBO.B_H_Limited_Waiting_M_S_8AM_6PM'

newgdbname = gdbname.replace('_', '')

print(newgdbname)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Feb 2023 15:10:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/remove-special-characters-from-geo-database/m-p/1254848#M66789</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2023-02-03T15:10:31Z</dc:date>
    </item>
    <item>
      <title>Re: Remove Special Characters from Geo database Feature Classes</title>
      <link>https://community.esri.com/t5/python-questions/remove-special-characters-from-geo-database/m-p/1254890#M66792</link>
      <description>&lt;LI-CODE lang="python"&gt;import arcpy

arcpy.env.workspace = "c:/data/gdb.gdb"

for fc in arcpy.ListFeatureClasses():
    if "_" in arcpy.Describe(fc).name:
        arcpy.management.Rename(fc, arcpy.Describe(fc).name.replace('_', '',))&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 03 Feb 2023 16:17:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/remove-special-characters-from-geo-database/m-p/1254890#M66792</guid>
      <dc:creator>DannyMcVey</dc:creator>
      <dc:date>2023-02-03T16:17:04Z</dc:date>
    </item>
  </channel>
</rss>

