MXD Defragmenter


This document was published with and applies to ArcGIS 9.3.
A 9.2 version also exists.

In this topic


About the ArcGIS Document Defragmenter utility

The ArcGIS Document Defragmenter utility defragments the storage inside an ArcMap document (.mxd) file to potentially reduce the file size. You'll find this utility useful if your .mxd files are large in size. The utility can also defragment ArcScene documents (.sxd), ArcGlobe documents (.3dd), and ArcMap templates (.mxt).
 
You can defragment a single document file, all ArcGIS documents in a particular folder, or all documents found in folders beneath a point in the file tree. There are different options for placement of the defragmented documents. By default, a new document file is created in the same folder as the original file; the name of the new file is the same as the original file name with _Defrag appended to it. For example, if you defragmented JoshuaTreeNP.mxd, the new file is JoshuaTreeNP_Defrag.mxd.
 
This utility is provided as is. Back up the original file before using the Document Defragmenter.
 

Using the ArcGIS Document Defragmenter dialog box

The ArcGIS Document Defragmenter is a stand-alone executable. Run DocDefragmenter.exe (located in the Tools folder of the ArcGIS Developer Kit) to open the ArcGIS Document Defragmenter dialog box as shown in the following screen shot:
 
 
The steps to operate the Document Defragmenter are as follows:
  1. Choose a file selection option.
  2. Click Select and navigate to the single document file (such as an .mxd) or the folder that contains document files.
  3. Choose a file handling option; this determines how the defragmented file is named. The options are as follows:
  4. Click OK to start the defragmentation on the selected files.
  5. Click Exit to end the application.
 
It is possible that the defragmentation may fail due to file access permissions. If this happens, you can deduce the problem with the help of the error message and the files left behind by the process.
 
The file handling during defragmentation proceeds as follows:
  1. The defragmented file is made using _Defrag at the end of its file name.
  2. If appropriate to the file handling option chosen, the original file has its extension changed to .old.
  3. If appropriate, the defragmented file is renamed using the original file name.
  4. If appropriate, the original file is deleted.
 

Using the command line

The ArcGIS Document Defragmenter can be run as a command from the MS-DOS prompt. The usage is as follows:
 
The success of the operation can only be determined by the existence of the target file. No message or success status is returned.