Defragmenting partitions is an important part of regular system maintenance to ensure that disks perform optimally. Although XP includes the GUI-based Disk Defragmenter tool, the DEFRAG command line version of the tool is a simple and effective alternative. To run the tool and force defragmentation on drive E:, the command would be DEFRAG e: -f.
To simply analyze the level of fragmentation on the same disk, the command would be DEFRAG d: -a.