<?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 Specifying location of temporary files created during python scripting in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/specifying-location-of-temporary-files-created/m-p/687966#M53286</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm having some relatively large temporary files created on my primary hard drive during python scripting with arcpy. Their location appears to default to C:\%appdata%\Local\Temp. I need them to be stored in a different location. I came across a couple postings suggesting to set the ARCTMPDIR environment variable to a different directory, and I've done that, but it doesn't seem to help. The temp files are still created on the C drive.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are there any other things I can try?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 28 Jul 2014 14:00:31 GMT</pubDate>
    <dc:creator>SheldonBrown</dc:creator>
    <dc:date>2014-07-28T14:00:31Z</dc:date>
    <item>
      <title>Specifying location of temporary files created during python scripting</title>
      <link>https://community.esri.com/t5/python-questions/specifying-location-of-temporary-files-created/m-p/687966#M53286</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm having some relatively large temporary files created on my primary hard drive during python scripting with arcpy. Their location appears to default to C:\%appdata%\Local\Temp. I need them to be stored in a different location. I came across a couple postings suggesting to set the ARCTMPDIR environment variable to a different directory, and I've done that, but it doesn't seem to help. The temp files are still created on the C drive.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are there any other things I can try?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Jul 2014 14:00:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/specifying-location-of-temporary-files-created/m-p/687966#M53286</guid>
      <dc:creator>SheldonBrown</dc:creator>
      <dc:date>2014-07-28T14:00:31Z</dc:date>
    </item>
    <item>
      <title>Re: Specifying location of temporary files created during python scripting</title>
      <link>https://community.esri.com/t5/python-questions/specifying-location-of-temporary-files-created/m-p/687967#M53287</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You should be able to specify it in your python code using the following code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="kn"&gt;import&lt;/SPAN&gt; &lt;SPAN class="nn"&gt;arcpy&lt;/SPAN&gt;
&lt;SPAN class="n"&gt;arcpy&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;env&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;scratchWorkspace&lt;/SPAN&gt; &lt;SPAN class="o"&gt;=&lt;/SPAN&gt; &lt;SPAN class="s"&gt;"c:/LandUse/ForestCover"&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 04:56:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/specifying-location-of-temporary-files-created/m-p/687967#M53287</guid>
      <dc:creator>TimWitt2</dc:creator>
      <dc:date>2021-12-12T04:56:33Z</dc:date>
    </item>
    <item>
      <title>Re: Specifying location of temporary files created during python scripting</title>
      <link>https://community.esri.com/t5/python-questions/specifying-location-of-temporary-files-created/m-p/687968#M53288</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, Tim. Setting the scratch workspace to the temporary directory didn't help. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I additionally had to set the other two windows environment variables "TEMP" and "TMP" to the location of the temporary directory. The files go where expected now, and space will no longer be a constraint. Geoprocessing bliss!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Jul 2014 14:17:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/specifying-location-of-temporary-files-created/m-p/687968#M53288</guid>
      <dc:creator>SheldonBrown</dc:creator>
      <dc:date>2014-07-28T14:17:36Z</dc:date>
    </item>
  </channel>
</rss>

