<?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 Export Multiple MXDs to JPG in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/export-multiple-mxds-to-jpg/m-p/481945#M37680</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I need to export several individual MXDs (not within the context of a map book) to JPG. I understand the simple Python script used to export one at a time, but I need to be more efficient and export several at once. Any thoughts/suggestions?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Rebecca&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 06 May 2012 00:05:49 GMT</pubDate>
    <dc:creator>RebeccaRothbard</dc:creator>
    <dc:date>2012-05-06T00:05:49Z</dc:date>
    <item>
      <title>Export Multiple MXDs to JPG</title>
      <link>https://community.esri.com/t5/python-questions/export-multiple-mxds-to-jpg/m-p/481945#M37680</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I need to export several individual MXDs (not within the context of a map book) to JPG. I understand the simple Python script used to export one at a time, but I need to be more efficient and export several at once. Any thoughts/suggestions?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Rebecca&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 06 May 2012 00:05:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/export-multiple-mxds-to-jpg/m-p/481945#M37680</guid>
      <dc:creator>RebeccaRothbard</dc:creator>
      <dc:date>2012-05-06T00:05:49Z</dc:date>
    </item>
    <item>
      <title>Re: Export Multiple MXDs to JPG</title>
      <link>https://community.esri.com/t5/python-questions/export-multiple-mxds-to-jpg/m-p/481946#M37681</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The following script will export all MXDs in a folder to JPG:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;import arcpy, os inputPath = some path outputPath = some other path&amp;nbsp; #Loop through each MXD file for filename in os.listdir(inputPath): &amp;nbsp;&amp;nbsp;&amp;nbsp; fullpath = os.path.join(inputPath, filename) &amp;nbsp;&amp;nbsp;&amp;nbsp; if os.path.isfile(fullpath): &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if filename.lower().endswith(".mxd"):&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #Reference MXD and export &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mxd = arcpy.mapping.MapDocument(fullpath) &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.mapping.ExportToJPEG(mxd, outputPath + "\\" + filename + ".jpg")&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jeff&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 May 2012 15:24:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/export-multiple-mxds-to-jpg/m-p/481946#M37681</guid>
      <dc:creator>JeffBarrette</dc:creator>
      <dc:date>2012-05-07T15:24:29Z</dc:date>
    </item>
    <item>
      <title>Re: Export Multiple MXDs to JPG</title>
      <link>https://community.esri.com/t5/python-questions/export-multiple-mxds-to-jpg/m-p/481947#M37682</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Awesome!!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I changed something:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The output name will not be "map_document&lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;.mxd&lt;/SPAN&gt;&lt;SPAN&gt;.jpg" anymore... It'll be just "map_document.jpg"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And you can set some quality options (DPI and compression):&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
import arcpy, os
inputPath = os.curdir
outputPath = os.curdir

#Loop through each MXD file
for filename in os.listdir(inputPath):
&amp;nbsp;&amp;nbsp;&amp;nbsp; fullpath = os.path.join(inputPath, filename)
&amp;nbsp;&amp;nbsp;&amp;nbsp; if os.path.isfile(fullpath):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if filename.lower().endswith(".mxd"):

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #Reference MXD and export
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mxd = arcpy.mapping.MapDocument(fullpath)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; OutputJPGPath = os.path.join(outputPath, filename.replace(".mxd", ".jpg"))
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #arcpy.mapping.ExportToJPEG(mxd, OutputJPGPath)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.mapping.ExportToJPEG(mxd, OutputJPGPath, 'PAGE_LAYOUT', 0, 0, 200, "False", '24-BIT_TRUE_COLOR', 100)
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 21:16:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/export-multiple-mxds-to-jpg/m-p/481947#M37682</guid>
      <dc:creator>Raphael_Augusto_FoscariniFerre</dc:creator>
      <dc:date>2021-12-11T21:16:18Z</dc:date>
    </item>
  </channel>
</rss>

