<?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: Is there a way using Export XML Workspace Document to export every database connection from within a folder? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/is-there-a-way-using-export-xml-workspace-document/m-p/723732#M56024</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Instead of setting the workspace, try just putting the path there. In &lt;A _jive_internal="true" href="https://community.esri.com/thread/117526"&gt;another thread&lt;/A&gt;. Richard Fairhurst stated that setting the env environment settings in a stand-alone script didn't actually do anything.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 25 Nov 2014 21:08:00 GMT</pubDate>
    <dc:creator>Zeke</dc:creator>
    <dc:date>2014-11-25T21:08:00Z</dc:date>
    <item>
      <title>Is there a way using Export XML Workspace Document to export every database connection from within a folder?</title>
      <link>https://community.esri.com/t5/python-questions/is-there-a-way-using-export-xml-workspace-document/m-p/723725#M56017</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Say I have 40 database connections in a folder, is there some way to just export every database that has a connection?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead of writing&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;&lt;SPAN class="n"&gt;in_data&lt;/SPAN&gt; &lt;SPAN class="o"&gt;=&lt;/SPAN&gt; &lt;SPAN class="s"&gt;"c:/data/StJohns.gdb"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="n"&gt;out_file&lt;/SPAN&gt; &lt;SPAN class="o"&gt;=&lt;/SPAN&gt; &lt;SPAN class="s"&gt;"c:/data/StJohns.xml"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="n"&gt;export_option&lt;/SPAN&gt; &lt;SPAN class="o"&gt;=&lt;/SPAN&gt; &lt;SPAN class="s"&gt;"SCHEMA_ONLY"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="n"&gt;storage_type&lt;/SPAN&gt; &lt;SPAN class="o"&gt;=&lt;/SPAN&gt; &lt;SPAN class="s"&gt;"BINARY"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="n"&gt;export_metadata&lt;/SPAN&gt; &lt;SPAN class="o"&gt;=&lt;/SPAN&gt; &lt;SPAN class="s"&gt;"METADATA"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN class="c"&gt;# Execute ExportXMLWorkspaceDocument&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="n"&gt;arcpy&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;ExportXMLWorkspaceDocument_management&lt;/SPAN&gt;&lt;SPAN class="p"&gt;(&lt;/SPAN&gt;&lt;SPAN class="n"&gt;in_data&lt;/SPAN&gt;&lt;SPAN class="p"&gt;,&lt;/SPAN&gt; &lt;SPAN class="n"&gt;out_file&lt;/SPAN&gt;&lt;SPAN class="p"&gt;,&lt;/SPAN&gt; &lt;SPAN class="n"&gt;export_option&lt;/SPAN&gt;&lt;SPAN class="p"&gt;,&lt;/SPAN&gt; &lt;SPAN class="n"&gt;storage_type&lt;/SPAN&gt;&lt;SPAN class="p"&gt;,&lt;/SPAN&gt; &lt;SPAN class="n"&gt;export_metadata&lt;/SPAN&gt;&lt;SPAN class="p"&gt;)&lt;/SPAN&gt;&lt;BR /&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;40 times?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Nov 2014 15:01:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/is-there-a-way-using-export-xml-workspace-document/m-p/723725#M56017</guid>
      <dc:creator>MichaelRivera</dc:creator>
      <dc:date>2014-11-17T15:01:06Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way using Export XML Workspace Document to export every database connection from within a folder?</title>
      <link>https://community.esri.com/t5/python-questions/is-there-a-way-using-export-xml-workspace-document/m-p/723726#M56018</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A simple model should suffice as shown below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="30852" alt="Capture.PNG" class="jive-image image-1" src="https://community.esri.com/legacyfs/online/30852_Capture.PNG" style="width: 620px; height: 460px;" /&gt;&lt;/P&gt;&lt;P&gt;Use the Iterate Workspace to return File GeoDatabases and tick on recursive if you want drill down into the sub-folders. You would then use inline substitution to ensure a unique file name for the Output file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to do this in just python then look at this function &lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//000v0000001w000000"&gt;here&lt;/A&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Nov 2014 19:09:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/is-there-a-way-using-export-xml-workspace-document/m-p/723726#M56018</guid>
      <dc:creator>DuncanHornby</dc:creator>
      <dc:date>2014-11-17T19:09:43Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way using Export XML Workspace Document to export every database connection from within a folder?</title>
      <link>https://community.esri.com/t5/python-questions/is-there-a-way-using-export-xml-workspace-document/m-p/723727#M56019</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'd like to do it with Python.&amp;nbsp; The Python function you listed is shown working for &lt;CODE&gt;&lt;SPAN class="n"&gt;arcpy&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;Compact_management which would get the its "in_workspace" from &lt;/SPAN&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;workspaces = arcpy.ListWorkspaces("*", "FileGDB")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but &lt;CODE&gt;&lt;SPAN class="n"&gt;arcpy&lt;/SPAN&gt;&lt;SPAN class="o"&gt;.&lt;/SPAN&gt;&lt;SPAN class="n"&gt;ExportXMLWorkspaceDocument_management requires a "out_file" variable, so how would that work with workspaces = arcpy.ListWorkspaces("*", "FileGDB")?&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Nov 2014 20:39:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/is-there-a-way-using-export-xml-workspace-document/m-p/723727#M56019</guid>
      <dc:creator>MichaelRivera</dc:creator>
      <dc:date>2014-11-17T20:39:11Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way using Export XML Workspace Document to export every database connection from within a folder?</title>
      <link>https://community.esri.com/t5/python-questions/is-there-a-way-using-export-xml-workspace-document/m-p/723728#M56020</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Michael,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;import arcpy, os&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;arcpy.env.workspace = r"&amp;lt;path&amp;gt;"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;workspaces = arcpy.ListWorkspaces("*", "FileGDB")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for workspace in workspaces:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; print workspace&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; n,t = os.path.basename(workspace).split(".")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; xml = arcpy.env.workspace + os.sep + "{0}.xml"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.ExportXMLWorkspaceDocument_management(workspace, xml.format(n))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Nov 2014 01:01:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/is-there-a-way-using-export-xml-workspace-document/m-p/723728#M56020</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2014-11-18T01:01:37Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way using Export XML Workspace Document to export every database connection from within a folder?</title>
      <link>https://community.esri.com/t5/python-questions/is-there-a-way-using-export-xml-workspace-document/m-p/723729#M56021</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is my path formatting incorrect?&lt;/P&gt;&lt;P&gt;I've tried&lt;/P&gt;&lt;P&gt;arcpy.env.workspace = r"D:/Valor/"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and the script bales pretty quick, don't even see a error message.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Nov 2014 13:38:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/is-there-a-way-using-export-xml-workspace-document/m-p/723729#M56021</guid>
      <dc:creator>MichaelRivera</dc:creator>
      <dc:date>2014-11-21T13:38:58Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way using Export XML Workspace Document to export every database connection from within a folder?</title>
      <link>https://community.esri.com/t5/python-questions/is-there-a-way-using-export-xml-workspace-document/m-p/723730#M56022</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you use r before the string, use the regular Windows backslash in your path - \. Using a forward slash is for when you don't use r. Using it the way you have above, python interprets the forward slash as just that, a forward slash, which does not work on Windows.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Nov 2014 13:58:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/is-there-a-way-using-export-xml-workspace-document/m-p/723730#M56022</guid>
      <dc:creator>Zeke</dc:creator>
      <dc:date>2014-11-21T13:58:30Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way using Export XML Workspace Document to export every database connection from within a folder?</title>
      <link>https://community.esri.com/t5/python-questions/is-there-a-way-using-export-xml-workspace-document/m-p/723731#M56023</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Windows 7 machine.&lt;/P&gt;&lt;P&gt;I've tried&lt;/P&gt;&lt;OL style="list-style-type: lower-alpha;"&gt;&lt;LI&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif; background: white;"&gt;arcpy.env.workspace = r"D:\Valor\"&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif; background: white;"&gt;and &lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;arcpy.env.workspace = r"D:/Valor/"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 10pt; background: white; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;and &lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;arcpy.env.workspace = "D:/Valor/"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; background: white; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;None of them work.&amp;nbsp; The black box opens up quickly with no error message before closing.&amp;nbsp; Nothing happens &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/sad.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Nov 2014 18:41:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/is-there-a-way-using-export-xml-workspace-document/m-p/723731#M56023</guid>
      <dc:creator>MichaelRivera</dc:creator>
      <dc:date>2014-11-25T18:41:56Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way using Export XML Workspace Document to export every database connection from within a folder?</title>
      <link>https://community.esri.com/t5/python-questions/is-there-a-way-using-export-xml-workspace-document/m-p/723732#M56024</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Instead of setting the workspace, try just putting the path there. In &lt;A _jive_internal="true" href="https://community.esri.com/thread/117526"&gt;another thread&lt;/A&gt;. Richard Fairhurst stated that setting the env environment settings in a stand-alone script didn't actually do anything.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Nov 2014 21:08:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/is-there-a-way-using-export-xml-workspace-document/m-p/723732#M56024</guid>
      <dc:creator>Zeke</dc:creator>
      <dc:date>2014-11-25T21:08:00Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way using Export XML Workspace Document to export every database connection from within a folder?</title>
      <link>https://community.esri.com/t5/python-questions/is-there-a-way-using-export-xml-workspace-document/m-p/723733#M56025</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Where are you attempting to run the script? In an IDE like IDLE or PyScripter? Or directly in the python window in ArcMap?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to run the script in the Command Prompt you will have to change directories to the location of the script and call it:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="2014-11-25_11-29-06.jpg" class="jive-image image-1" src="https://community.esri.com/legacyfs/online/34464_2014-11-25_11-29-06.jpg" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would recommend running the script in an IDE...I like PyScripter but some people like IDLE or PythonWin.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Nov 2014 21:42:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/is-there-a-way-using-export-xml-workspace-document/m-p/723733#M56025</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2014-11-25T21:42:28Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way using Export XML Workspace Document to export every database connection from within a folder?</title>
      <link>https://community.esri.com/t5/python-questions/is-there-a-way-using-export-xml-workspace-document/m-p/723734#M56026</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Running the script by just double-clicking on it from its Windows folder.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Nov 2014 21:26:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/is-there-a-way-using-export-xml-workspace-document/m-p/723734#M56026</guid>
      <dc:creator>MichaelRivera</dc:creator>
      <dc:date>2014-11-28T21:26:58Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way using Export XML Workspace Document to export every database connection from within a folder?</title>
      <link>https://community.esri.com/t5/python-questions/is-there-a-way-using-export-xml-workspace-document/m-p/723735#M56027</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Where do you get pythonwin?&amp;nbsp; It used to be included on the ArcGIS install CD but hasn't been for awhile. I can't find where to download it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Dec 2014 19:59:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/is-there-a-way-using-export-xml-workspace-document/m-p/723735#M56027</guid>
      <dc:creator>MichaelRivera</dc:creator>
      <dc:date>2014-12-02T19:59:12Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way using Export XML Workspace Document to export every database connection from within a folder?</title>
      <link>https://community.esri.com/t5/python-questions/is-there-a-way-using-export-xml-workspace-document/m-p/723736#M56028</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is a link to PyScripter&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://code.google.com/p/pyscripter/" title="https://code.google.com/p/pyscripter/"&gt;pyscripter - An open-source Python Integrated Development Environment (IDE) - Google Project Hosting&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Dec 2014 20:06:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/is-there-a-way-using-export-xml-workspace-document/m-p/723736#M56028</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2014-12-02T20:06:50Z</dc:date>
    </item>
  </channel>
</rss>

