Using the Document Defragmenter utility

The ArcGIS Document Defragmenter utility defragments the storage inside an .mxd file to potentially reduce the file size. This utility is useful if your .mxd files are large in size. The utility can also defragment .sxd, .3dd, and, .mxt files. The utility is located in the Tools folder of the ArcGIS for Desktop installation directory. By default, that location is <install path>:\Program Files\ArcGIS\Desktop10.1\Tools. Alternatively, you can open the utility from All Programs > ArcGIS > Desktop Tools.

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 and 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.

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.

This utility is provided as a courtesy to help repair problematic fragmented .mxds. Create a backup copy of the original file before using the Document Defragmenter.

TipTip:

The ArcGIS Document Defragmenter utility can be run as a command from the MS-DOS prompt. The usage is as follows:

DocDefragmenter <full source file path> <full target file path>

No message or success status is returned from the command or utility; therefore, the success of the operation can only be determined by the existence of the target file.

To run the utility wizard, do the following:

Steps:
  1. Run DocDefragmenter.exe.

    The ArcGIS Document Defragmenter dialog box opens as shown here:

    The ArcGIS Document Defragmenter dialog box

  2. Choose a file selection option.
    • Click Single file to defragment a single document file.
    • Click Folder to defragment all ArcGIS document files in a particular folder.
    • Click Folder and all subfolders to defragment all ArcGIS document files in a particular folder and recursively under all its subfolders.
  3. Click Select and navigate to the single document file (such as an .mxd) or the folder that contains the document files.
  4. Choose a file handling option; this determines how the defragmented file is named. The options are as follows:
    • Leave the original file as it is and create the new defragmented file with _Defrag appended to the original file name.
    • Replace the original file with the defragmented file. Change the extension of the original file to .old.
    • Overwrite the original file.
      CautionCaution:

      You must ensure that there are backup copies of the original file (as well as all .mxd files in the folders selected) if you choose this option.

  5. Click OK to start the defragmentation on the selected files.
  6. When the defragmentation finishes, click Exit to close the application.

The specified files should now be less fragmented and take up less disk space.

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.

8/2/2012