<?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: Automate the .saveACopy() ArcPy method to reduce MXD file size in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/automate-the-saveacopy-arcpy-method-to-reduce-mxd/m-p/204113#M15709</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the suggestion.&amp;nbsp; This approach does represent a solution, though not quite what I had hoped for.&amp;nbsp; It's shortcomings are that it is very slow because DocDefragmenter has to be re-executed for every MXD in mxdList (about 4.5 minutes to process 37 MXDs vs 8 seconds using the native DocDefragmenter executable), and the command line form of DocDefragmenter does not accommodate the same range of options available in the native DocDefragmenter dialog.&amp;nbsp; Nevertheless, it is adequate for situations where a scripted, non-interactive MXD file size reduction is required.&amp;nbsp; Otherwise, just running the native DocDefragmenter executable would be faster, and offers more options.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the working snippet that I tested...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;import arcpy, subprocess&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;docDefrag = r"C:\Program Files (x86)\ArcGIS\Desktop10.1\Tools\DocDefragmenter.exe"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;inFolder&amp;nbsp; = r"C:\Workspace\projects"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;outFolder = r"C:\Workspace\projects\backups\BackUp1"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;arcpy.env.workspace = inFolder&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;mxdList = arcpy.ListFiles("*.mxd")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;for mxd in mxdList:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; inMXD&amp;nbsp; = inFolder&amp;nbsp; + "\\" + mxd&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; outMXD = outFolder + "\\" + mxd[:-4] + "_Defrag.mxd"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; argList = []&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; argList.append(docDefrag)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; argList.append(inMXD)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; argList.append(outMXD)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; subprocess.call(argList)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 01 Sep 2014 21:49:46 GMT</pubDate>
    <dc:creator>CarlBeyerhelm</dc:creator>
    <dc:date>2014-09-01T21:49:46Z</dc:date>
    <item>
      <title>Automate the .saveACopy() ArcPy method to reduce MXD file size</title>
      <link>https://community.esri.com/t5/python-questions/automate-the-saveacopy-arcpy-method-to-reduce-mxd/m-p/204111#M15707</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a folder of 50+ MXDs that have been edited repeatedly, such that their file size has increased over the course of time.&amp;nbsp; Applying &lt;STRONG&gt;File - Save A Copy&lt;/STRONG&gt; from ArcMap, or the &lt;STRONG&gt;mapDoc.saveACopy()&lt;/STRONG&gt; method in the Python window will reduce the current MXD's file size...but only for the MXD that is currently open in ArcMap.&amp;nbsp; Applying the &lt;STRONG&gt;mapDoc.saveACopy()&lt;/STRONG&gt; method to a long ArcPy list of MXDs does, indeed make a copy of the MXDs, but it does not also reduce their file size.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, the question is, is there a way to automate MXD file size reduction?&amp;nbsp; I've explored the &lt;STRONG&gt;os.startfile(mxd_path)&lt;/STRONG&gt; scenario, but it opens a new instance of ArcMap for each MXD...which is not satisfactory.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Advice or insights are welcome.&amp;nbsp; Thanks...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 31 Aug 2014 20:42:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/automate-the-saveacopy-arcpy-method-to-reduce-mxd/m-p/204111#M15707</guid>
      <dc:creator>CarlBeyerhelm</dc:creator>
      <dc:date>2014-08-31T20:42:00Z</dc:date>
    </item>
    <item>
      <title>Re: Automate the .saveACopy() ArcPy method to reduce MXD file size</title>
      <link>https://community.esri.com/t5/python-questions/automate-the-saveacopy-arcpy-method-to-reduce-mxd/m-p/204112#M15708</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried this,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;import subprocess&lt;/P&gt;&lt;P&gt;subprocess.call(['C:\Program Files (x86)\ArcGIS\Desktop10.2\Tools\DocDefragmenter.exe', r'sourcefilepath', r'targetfilepath'])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Sep 2014 01:46:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/automate-the-saveacopy-arcpy-method-to-reduce-mxd/m-p/204112#M15708</guid>
      <dc:creator>ChrisPedrezuela</dc:creator>
      <dc:date>2014-09-01T01:46:58Z</dc:date>
    </item>
    <item>
      <title>Re: Automate the .saveACopy() ArcPy method to reduce MXD file size</title>
      <link>https://community.esri.com/t5/python-questions/automate-the-saveacopy-arcpy-method-to-reduce-mxd/m-p/204113#M15709</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the suggestion.&amp;nbsp; This approach does represent a solution, though not quite what I had hoped for.&amp;nbsp; It's shortcomings are that it is very slow because DocDefragmenter has to be re-executed for every MXD in mxdList (about 4.5 minutes to process 37 MXDs vs 8 seconds using the native DocDefragmenter executable), and the command line form of DocDefragmenter does not accommodate the same range of options available in the native DocDefragmenter dialog.&amp;nbsp; Nevertheless, it is adequate for situations where a scripted, non-interactive MXD file size reduction is required.&amp;nbsp; Otherwise, just running the native DocDefragmenter executable would be faster, and offers more options.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the working snippet that I tested...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;import arcpy, subprocess&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;docDefrag = r"C:\Program Files (x86)\ArcGIS\Desktop10.1\Tools\DocDefragmenter.exe"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;inFolder&amp;nbsp; = r"C:\Workspace\projects"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;outFolder = r"C:\Workspace\projects\backups\BackUp1"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;arcpy.env.workspace = inFolder&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;mxdList = arcpy.ListFiles("*.mxd")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;for mxd in mxdList:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; inMXD&amp;nbsp; = inFolder&amp;nbsp; + "\\" + mxd&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; outMXD = outFolder + "\\" + mxd[:-4] + "_Defrag.mxd"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; argList = []&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; argList.append(docDefrag)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; argList.append(inMXD)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; argList.append(outMXD)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; subprocess.call(argList)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Sep 2014 21:49:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/automate-the-saveacopy-arcpy-method-to-reduce-mxd/m-p/204113#M15709</guid>
      <dc:creator>CarlBeyerhelm</dc:creator>
      <dc:date>2014-09-01T21:49:46Z</dc:date>
    </item>
    <item>
      <title>Re: Automate the .saveACopy() ArcPy method to reduce MXD file size</title>
      <link>https://community.esri.com/t5/python-questions/automate-the-saveacopy-arcpy-method-to-reduce-mxd/m-p/204114#M15710</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I agree Carl, I've been looking for other ways before actually, some lead to doing something with ArcObjects rather than python. But just for a stop-gap solution, and just utilising what already exist, this might suffice. You might also just create a batch command file as well and run as&amp;nbsp; a schedule task.&amp;nbsp; Although I read MXD doctor does a similar job in reducing file size as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Sep 2014 22:17:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/automate-the-saveacopy-arcpy-method-to-reduce-mxd/m-p/204114#M15710</guid>
      <dc:creator>ChrisPedrezuela</dc:creator>
      <dc:date>2014-09-01T22:17:14Z</dc:date>
    </item>
    <item>
      <title>Re: Automate the .saveACopy() ArcPy method to reduce MXD file size</title>
      <link>https://community.esri.com/t5/python-questions/automate-the-saveacopy-arcpy-method-to-reduce-mxd/m-p/204115#M15711</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Although this won't address the immediate need for a workaround, I think there is a bug here.&amp;nbsp; If one uses MapDocument.saveaCopy and specifies an earlier version, like 10.0 from 10.1 or 10.2, the output of the saved MXD is dramatically smaller on several large MXDs I grabbed.&amp;nbsp; Basically saving from ArcMap to any version shrinks the file size and saving from arcpy to previous version shrinks the file size, but saving from arcpy to current version doesn't.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a bit more digging before deciding whether to open an Esri Support case/incident.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Sep 2014 22:42:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/automate-the-saveacopy-arcpy-method-to-reduce-mxd/m-p/204115#M15711</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2014-09-02T22:42:47Z</dc:date>
    </item>
    <item>
      <title>Re: Automate the .saveACopy() ArcPy method to reduce MXD file size</title>
      <link>https://community.esri.com/t5/python-questions/automate-the-saveacopy-arcpy-method-to-reduce-mxd/m-p/204116#M15712</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you.&amp;nbsp; That is interesting.&amp;nbsp; I hadn't explored the nuances of saving down to prior versions.&amp;nbsp; So, yes, it does seem like a bug if saving down to prior versions from arcpy results in smaller file size, but saving from arcpy to the current version does not reduce file size.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Sep 2014 15:55:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/automate-the-saveacopy-arcpy-method-to-reduce-mxd/m-p/204116#M15712</guid>
      <dc:creator>CarlBeyerhelm</dc:creator>
      <dc:date>2014-09-03T15:55:51Z</dc:date>
    </item>
    <item>
      <title>Re: Automate the .saveACopy() ArcPy method to reduce MXD file size</title>
      <link>https://community.esri.com/t5/python-questions/automate-the-saveacopy-arcpy-method-to-reduce-mxd/m-p/204117#M15713</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A bug on this issue has been opened with Esri Support.&amp;nbsp; As of now, no timeline for when it might be addressed.&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;Esri Support:&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: Arial;"&gt;Bug BUG-000081100: &lt;/SPAN&gt;&lt;SPAN style="font-family: Arial;"&gt;Arcpy.mapping.MapDocument.saveACopy() does not work the same as the ArcMap Save A Copy functionality. The output mxd is not compacted.&lt;/SPAN&gt;&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Sep 2014 15:02:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/automate-the-saveacopy-arcpy-method-to-reduce-mxd/m-p/204117#M15713</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2014-09-05T15:02:42Z</dc:date>
    </item>
    <item>
      <title>Re: Automate the .saveACopy() ArcPy method to reduce MXD file size</title>
      <link>https://community.esri.com/t5/python-questions/automate-the-saveacopy-arcpy-method-to-reduce-mxd/m-p/204118#M15714</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Sep 2014 16:16:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/automate-the-saveacopy-arcpy-method-to-reduce-mxd/m-p/204118#M15714</guid>
      <dc:creator>CarlBeyerhelm</dc:creator>
      <dc:date>2014-09-05T16:16:38Z</dc:date>
    </item>
    <item>
      <title>Re: Automate the .saveACopy() ArcPy method to reduce MXD file size</title>
      <link>https://community.esri.com/t5/python-questions/automate-the-saveacopy-arcpy-method-to-reduce-mxd/m-p/204119#M15715</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Heard back from Esri Development, "this is very much a known limit."&amp;nbsp; It seems to a handful or two of folks in Redlands, this is "very much" known; unfortunately up until now, no one has bothered to share it with ArcGIS users by actually documenting it.&amp;nbsp; At least now they have a bug to document it and to document they aren't going to do anything to address it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I "very much" get this response too often, can't help but think there is a hashtag reply in it: #findanotherworkflow #SOOL.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Sep 2014 18:48:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/automate-the-saveacopy-arcpy-method-to-reduce-mxd/m-p/204119#M15715</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2014-09-30T18:48:01Z</dc:date>
    </item>
    <item>
      <title>Re: Automate the .saveACopy() ArcPy method to reduce MXD file size</title>
      <link>https://community.esri.com/t5/python-questions/automate-the-saveacopy-arcpy-method-to-reduce-mxd/m-p/204120#M15716</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What's making your mxds grow so much? Geoprocessing history? There are settings you can do to keep that from getting way out of hand if that is the main issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can test this by opening the MXD and opening the GP results, delete some history and see how much it shrinks your MXD.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Oct 2014 05:38:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/automate-the-saveacopy-arcpy-method-to-reduce-mxd/m-p/204120#M15716</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2014-10-01T05:38:49Z</dc:date>
    </item>
    <item>
      <title>Re: Automate the .saveACopy() ArcPy method to reduce MXD file size</title>
      <link>https://community.esri.com/t5/python-questions/automate-the-saveacopy-arcpy-method-to-reduce-mxd/m-p/204121#M15717</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, maintaining geoprocessing history can be one source of MXD bloat.&amp;nbsp; However, the most puzzling (and annoying) one is when you open an MXD, do nothing except click SAVE, exit ArcMap, and notice that the MXD has doubled in size.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Oct 2014 15:28:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/automate-the-saveacopy-arcpy-method-to-reduce-mxd/m-p/204121#M15717</guid>
      <dc:creator>CarlBeyerhelm</dc:creator>
      <dc:date>2014-10-01T15:28:10Z</dc:date>
    </item>
    <item>
      <title>Re: Automate the .saveACopy() ArcPy method to reduce MXD file size</title>
      <link>https://community.esri.com/t5/python-questions/automate-the-saveacopy-arcpy-method-to-reduce-mxd/m-p/204122#M15718</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What's making the MXDs grow so much?&amp;nbsp; Good question, I wish we had clear answers.&amp;nbsp; Part of it is likely user behavior, although it is unclear what all behaviors cause the problem, but another part is how the MXDs are structured (design structure) and how ArcGIS interacts with them.&amp;nbsp; Geoprocessing history may play a part in some of the MXDs, but it isn't the dominant issue with the majority of the MXDs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MXD bloat isn't an issue amongst GIS staff as much as the casual GIS user in our organization.&amp;nbsp; There are numerous worst practices that casual users seem to develop over time, and some of them may contribute to bloat, but there are limits to what can be expected from educating users on best practices.&amp;nbsp; The bottom line for us is that we have an issue, prevention has its limits, and so we need to explore ways of cleaning it up on the back end.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Opening up MXDs and trimming geoprocessing history will shrink some files to varying extents.&amp;nbsp; What also works is just opening up MXDs and saving a copy using the ArcMap UI.&amp;nbsp; The shortcoming of this approach is that it is manual.&amp;nbsp; We are looking for means to automate cleaning it up for thousands or tens of thousands of files.&amp;nbsp; Right now, either spawning docDefragmeter from Python or shell scripting it works, it is just clunkier and slower than we would like.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Oct 2014 21:23:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/automate-the-saveacopy-arcpy-method-to-reduce-mxd/m-p/204122#M15718</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2014-10-01T21:23:26Z</dc:date>
    </item>
    <item>
      <title>Re: Automate the .saveACopy() ArcPy method to reduce MXD file size</title>
      <link>https://community.esri.com/t5/python-questions/automate-the-saveacopy-arcpy-method-to-reduce-mxd/m-p/204123#M15719</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's great that &lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;DocDefragmenter.exe is working albeit being clunky. I'm going to vote up this thread!&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Oct 2014 02:49:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/automate-the-saveacopy-arcpy-method-to-reduce-mxd/m-p/204123#M15719</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2014-10-02T02:49:38Z</dc:date>
    </item>
  </channel>
</rss>

