<?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 overwriteOutput syntax in Transportation Questions</title>
    <link>https://community.esri.com/t5/transportation-questions/overwriteoutput-syntax/m-p/374037#M1237</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: MCline19&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am very new to python and am having trouble getting the correct syntax to overwrite existing files.&amp;nbsp; Using the syntax I have now, the process appends a "_1" to the new output file.&amp;nbsp; Currently my syntax reads:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy

for x in sdeFiles: #sdeFiles is a list
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.env.overwriteOutput = True
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.FeatureClassToShapefile_conversion(x,'G:\GISAdmin\SDE_Backups\NewTempShapefiles')&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any advise on how to resolve this issue would be greatly appreciated.&amp;nbsp; Thanks!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 17:18:19 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2021-12-11T17:18:19Z</dc:date>
    <item>
      <title>overwriteOutput syntax</title>
      <link>https://community.esri.com/t5/transportation-questions/overwriteoutput-syntax/m-p/374037#M1237</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: MCline19&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am very new to python and am having trouble getting the correct syntax to overwrite existing files.&amp;nbsp; Using the syntax I have now, the process appends a "_1" to the new output file.&amp;nbsp; Currently my syntax reads:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy

for x in sdeFiles: #sdeFiles is a list
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.env.overwriteOutput = True
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.FeatureClassToShapefile_conversion(x,'G:\GISAdmin\SDE_Backups\NewTempShapefiles')&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any advise on how to resolve this issue would be greatly appreciated.&amp;nbsp; Thanks!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 17:18:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/transportation-questions/overwriteoutput-syntax/m-p/374037#M1237</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-12-11T17:18:19Z</dc:date>
    </item>
    <item>
      <title>Re: overwriteOutput syntax</title>
      <link>https://community.esri.com/t5/transportation-questions/overwriteoutput-syntax/m-p/374038#M1238</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Try:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.env.overwriteOutput = 1&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Jul 2012 15:19:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/transportation-questions/overwriteoutput-syntax/m-p/374038#M1238</guid>
      <dc:creator>MichaelMiller2</dc:creator>
      <dc:date>2012-07-02T15:19:52Z</dc:date>
    </item>
    <item>
      <title>Re: overwriteOutput syntax</title>
      <link>https://community.esri.com/t5/transportation-questions/overwriteoutput-syntax/m-p/374039#M1239</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: MCline19&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It still appended a "_1".&amp;nbsp;&amp;nbsp; &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Jul 2012 15:30:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/transportation-questions/overwriteoutput-syntax/m-p/374039#M1239</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2012-07-02T15:30:10Z</dc:date>
    </item>
    <item>
      <title>Re: overwriteOutput syntax</title>
      <link>https://community.esri.com/t5/transportation-questions/overwriteoutput-syntax/m-p/374040#M1240</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You have a missing r tag to make the path work as a raw string with backslashes, but that is not the issue.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The help clearly says that it will append _1 if the file exists, so it obviously does not honour the environment setting.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So just check if it exists and delete it yourself.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;arcpy.env.workspace = "destination_folder"
if arcpy.Exists(x):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.management.Delete(x)
arcpy.conversion.FeatureClassToShapefile(x,"destination_folder")
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 17:18:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/transportation-questions/overwriteoutput-syntax/m-p/374040#M1240</guid>
      <dc:creator>KimOllivier</dc:creator>
      <dc:date>2021-12-11T17:18:22Z</dc:date>
    </item>
    <item>
      <title>Re: overwriteOutput syntax</title>
      <link>https://community.esri.com/t5/transportation-questions/overwriteoutput-syntax/m-p/374041#M1241</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: MCline19&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;That works.&amp;nbsp; Good advise!&amp;nbsp; Thank you.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Jul 2012 14:54:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/transportation-questions/overwriteoutput-syntax/m-p/374041#M1241</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2012-07-03T14:54:34Z</dc:date>
    </item>
    <item>
      <title>Re: overwriteOutput syntax</title>
      <link>https://community.esri.com/t5/transportation-questions/overwriteoutput-syntax/m-p/374042#M1242</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I had similar issues until I got it to work in my code by using&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;overwriteOutput = 'True'&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jul 2012 14:44:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/transportation-questions/overwriteoutput-syntax/m-p/374042#M1242</guid>
      <dc:creator>GerickeCook</dc:creator>
      <dc:date>2012-07-05T14:44:26Z</dc:date>
    </item>
  </channel>
</rss>

