This document was published with and applies to ArcGIS 9.3.
A 9.2 version also exists.
A 9.2 version also exists.
In this topic
- About the ArcGIS Document Defragmenter utility
- Using the ArcGIS Document Defragmenter dialog box
- Using the command line
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.
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:
- 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.
- 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. You must ensure the original file (as well as all .mxd files in the folders selected) is backed up if you choose this option.
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:
- 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.
The ArcGIS Document Defragmenter 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>
The success of the operation can only be determined by the existence of the target file. No message or success status is returned.