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 Desktop installation directory. By default, that location is <install path>:\Program Files\ArcGIS\Desktop<Version Number>\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:
- The defragmented file is made using _Defrag at the end of its file name.
- If appropriate to the file handling option chosen, the original file has its extension changed to .old.
- If appropriate, the defragmented file is renamed using the original file name.
- 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.
To run the utility wizard, do the following:
-
Run DocDefragmenter.exe.
The ArcGIS Document Defragmenter dialog box opens as shown here:
- 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.
- Click Select and navigate to the single document file (such as an .mxd) or the folder that contains the document files.
- 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.
- Click OK to start the defragmentation on the selected files.
- 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.