<?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: best way to rename a folder using ArcPy in Python Snippets Questions</title>
    <link>https://community.esri.com/t5/python-snippets-questions/best-way-to-rename-a-folder-using-arcpy/m-p/804959#M275</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I will try it, I had the impression that was used specifically for ArcGIS datasets -&lt;/P&gt;&lt;P&gt;from docs:&amp;nbsp;&lt;SPAN style="color: #4d4d4d; background-color: #fefefe;"&gt;Changes the name of a dataset. This includes a wide variety of data types, among them feature dataset, raster, table, and shapefile.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4d4d4d; background-color: #fefefe;"&gt;I also wonder why os.rename causes a problem, although I will not wonder so much if something else works..thanks!&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 04 Dec 2018 17:02:12 GMT</pubDate>
    <dc:creator>JasonFitzsimmons</dc:creator>
    <dc:date>2018-12-04T17:02:12Z</dc:date>
    <item>
      <title>best way to rename a folder using ArcPy</title>
      <link>https://community.esri.com/t5/python-snippets-questions/best-way-to-rename-a-folder-using-arcpy/m-p/804957#M273</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I run a Python script to delete and recreate a set of map services.&amp;nbsp; To do this, I place a folder with all the mxds and data in the same directory as the existing folder, with a different name. The script then renames the folder using os.rename, and then uses that data for the new map services.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is, I get an 'Access Denied' error when I run this. The error is thrown when renaming the existing folder to 'folder_old'. If I restart the server, it will usually work, but this obviously is not ideal.&amp;nbsp; The server is an AWS instance, with ArcGIS 10.2.&amp;nbsp; I have full administrative rights on that machine, and I have IDLE set to run as an administrator.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a preferred ArcPy method to rename a data folder that I should be using instead?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Dec 2018 16:21:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-snippets-questions/best-way-to-rename-a-folder-using-arcpy/m-p/804957#M273</guid>
      <dc:creator>JasonFitzsimmons</dc:creator>
      <dc:date>2018-12-04T16:21:22Z</dc:date>
    </item>
    <item>
      <title>Re: best way to rename a folder using ArcPy</title>
      <link>https://community.esri.com/t5/python-snippets-questions/best-way-to-rename-a-folder-using-arcpy/m-p/804958#M274</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jason,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can try the &lt;A href="http://desktop.arcgis.com/en/arcmap/10.3/tools/data-management-toolbox/rename.htm"&gt;Rename &lt;/A&gt;tool.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Dec 2018 16:57:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-snippets-questions/best-way-to-rename-a-folder-using-arcpy/m-p/804958#M274</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2018-12-04T16:57:38Z</dc:date>
    </item>
    <item>
      <title>Re: best way to rename a folder using ArcPy</title>
      <link>https://community.esri.com/t5/python-snippets-questions/best-way-to-rename-a-folder-using-arcpy/m-p/804959#M275</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I will try it, I had the impression that was used specifically for ArcGIS datasets -&lt;/P&gt;&lt;P&gt;from docs:&amp;nbsp;&lt;SPAN style="color: #4d4d4d; background-color: #fefefe;"&gt;Changes the name of a dataset. This includes a wide variety of data types, among them feature dataset, raster, table, and shapefile.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4d4d4d; background-color: #fefefe;"&gt;I also wonder why os.rename causes a problem, although I will not wonder so much if something else works..thanks!&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Dec 2018 17:02:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-snippets-questions/best-way-to-rename-a-folder-using-arcpy/m-p/804959#M275</guid>
      <dc:creator>JasonFitzsimmons</dc:creator>
      <dc:date>2018-12-04T17:02:12Z</dc:date>
    </item>
  </channel>
</rss>

