<?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: Where to Write Temporary XML Files in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/where-to-write-temporary-xml-files/m-p/722084#M23897</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I wrote some tools along these lines, and used Windows TEMP.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In ModelBuilder, I got the path from the system environment variable TEMP using the Calculate Value tool. Set the output data type to Folder.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Expression: env("TEMP")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Code Block:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;def env(envVar): &amp;nbsp; import os &amp;nbsp; return os.environ[envVar]&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you're python scripting, just use os.environ&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;tmpXML = os.environ["TEMP"] + "/" + "xxtemp.xml"&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 15 Oct 2012 23:04:20 GMT</pubDate>
    <dc:creator>curtvprice</dc:creator>
    <dc:date>2012-10-15T23:04:20Z</dc:date>
    <item>
      <title>Where to Write Temporary XML Files</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/where-to-write-temporary-xml-files/m-p/722082#M23895</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm creating a tool to edit metadata.&amp;nbsp; The tool will export a feature class's metadata as an XML file, make modification to the file then import it back in.&amp;nbsp; Where is a safe place for tools to create temporary text and XML files?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Oct 2012 23:00:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/where-to-write-temporary-xml-files/m-p/722082#M23895</guid>
      <dc:creator>RandyKreuziger</dc:creator>
      <dc:date>2012-10-12T23:00:25Z</dc:date>
    </item>
    <item>
      <title>Re: Where to Write Temporary XML Files</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/where-to-write-temporary-xml-files/m-p/722083#M23896</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If you're using 10.1, you can use the &lt;/SPAN&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#/Scratch_Folder/001w00000046000000/"&gt;ScratchFolder&lt;/A&gt;&lt;SPAN&gt; environment value&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 13 Oct 2012 02:12:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/where-to-write-temporary-xml-files/m-p/722083#M23896</guid>
      <dc:creator>DaleHoneycutt</dc:creator>
      <dc:date>2012-10-13T02:12:05Z</dc:date>
    </item>
    <item>
      <title>Re: Where to Write Temporary XML Files</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/where-to-write-temporary-xml-files/m-p/722084#M23897</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I wrote some tools along these lines, and used Windows TEMP.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In ModelBuilder, I got the path from the system environment variable TEMP using the Calculate Value tool. Set the output data type to Folder.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Expression: env("TEMP")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Code Block:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;def env(envVar): &amp;nbsp; import os &amp;nbsp; return os.environ[envVar]&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you're python scripting, just use os.environ&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;tmpXML = os.environ["TEMP"] + "/" + "xxtemp.xml"&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Oct 2012 23:04:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/where-to-write-temporary-xml-files/m-p/722084#M23897</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2012-10-15T23:04:20Z</dc:date>
    </item>
    <item>
      <title>Re: Where to Write Temporary XML Files</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/where-to-write-temporary-xml-files/m-p/722085#M23898</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for the solutions.&amp;nbsp; I tried to mark both your posts as answering the question but the system won't allow it &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Oct 2012 22:09:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/where-to-write-temporary-xml-files/m-p/722085#M23898</guid>
      <dc:creator>RandyKreuziger</dc:creator>
      <dc:date>2012-10-17T22:09:19Z</dc:date>
    </item>
  </channel>
</rss>

