<?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 Rename FCs based on the name of other FCs in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/rename-fcs-based-on-the-name-of-other-fcs/m-p/409667#M32305</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've got a SDE where I import new FCs to update services. I keep the old ones as they are feeding map-services.&lt;/P&gt;&lt;P&gt;The news ones have the same name like the old ones but with an _1 at the end.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After all the work is done I want the old one being renamed e.g. _old and the new ones to the name of the old FCs.&lt;/P&gt;&lt;P&gt;An extra challange is that in the SDE there reside other tables that should not been touched (yellow=the old/new FC -- red=the ones that must not be changed)&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/459017_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;P&gt;I thought doing it with python, but I can only image the steps, not the code.&lt;/P&gt;&lt;P&gt;One way could be to&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. get a list of all the new FCs&lt;/P&gt;&lt;P&gt;2. truncate the list's entries and cut the _1&lt;/P&gt;&lt;P&gt;3. with this new list select the old FCs&lt;/P&gt;&lt;P&gt;4. rename the old ones to _old&lt;/P&gt;&lt;P&gt;5. rename the new one to something without _1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help would be appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Carsten&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 09 Sep 2019 14:13:20 GMT</pubDate>
    <dc:creator>CarstenHogertz</dc:creator>
    <dc:date>2019-09-09T14:13:20Z</dc:date>
    <item>
      <title>Rename FCs based on the name of other FCs</title>
      <link>https://community.esri.com/t5/python-questions/rename-fcs-based-on-the-name-of-other-fcs/m-p/409667#M32305</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've got a SDE where I import new FCs to update services. I keep the old ones as they are feeding map-services.&lt;/P&gt;&lt;P&gt;The news ones have the same name like the old ones but with an _1 at the end.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After all the work is done I want the old one being renamed e.g. _old and the new ones to the name of the old FCs.&lt;/P&gt;&lt;P&gt;An extra challange is that in the SDE there reside other tables that should not been touched (yellow=the old/new FC -- red=the ones that must not be changed)&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/459017_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;P&gt;I thought doing it with python, but I can only image the steps, not the code.&lt;/P&gt;&lt;P&gt;One way could be to&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. get a list of all the new FCs&lt;/P&gt;&lt;P&gt;2. truncate the list's entries and cut the _1&lt;/P&gt;&lt;P&gt;3. with this new list select the old FCs&lt;/P&gt;&lt;P&gt;4. rename the old ones to _old&lt;/P&gt;&lt;P&gt;5. rename the new one to something without _1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help would be appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Carsten&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Sep 2019 14:13:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/rename-fcs-based-on-the-name-of-other-fcs/m-p/409667#M32305</guid>
      <dc:creator>CarstenHogertz</dc:creator>
      <dc:date>2019-09-09T14:13:20Z</dc:date>
    </item>
  </channel>
</rss>

