Copyright Michael Karbo, Denmark, Europe.

  • Next chapter.
  • Previous chapter.

    Chapter 19. Harddisk maintenance

    An important part of disk cleanup is to delete unneeded files. But there are also other operations that are necessary to keep the harddisk in top shape. Here we will look at the Chkdsk command and the Defrag tool.

    Check the disk

    A good deal of the work in Windows XP consists of getting and saving files on the drives. Unfortunately errors often occur in this work. The more the pc is used, the more often there will actually be errors in the file system. In a worst case scenario the harddisk can become completely or partially unusable.

    In earlier Windows versions we had the ScanDisk pro­gram to at work on these areas, but in Windows XP the command Chkdsk is used.

    Chkdsk is an abbreviation of Checkdisk, and the program is somewhat special; it is a command and thus does not resemble the other Windows programs. The commands are actually a leftover from the DOS operating system and the earlier Windows versions. The comman­ds are run in so-called ”MS-DOS-windows”. You can read more about that in Windows’ Help, but try this exercise first:

    1.      Click on the Start button, and select menu item Run… Type chkdsk in the field:

    2.      Chkdsk ”runs”, in a small window. You can follow the command execution as lines of text in the window.

    3.      Chkdsk checks the drive where Windows XP is installed. On my pc it is the D drive:

    4.      If the check does not show errors, the command window closes automatically.

    5.      You can also ask Chkdsk to inspect other drives. Then you need to type a command such as chkdsk c[n27] : Enter

    6.      You can experience that Chkdsk finds errors and asks you to make a decision. There may be ”lost links[n28] .” Those are files that are destroyed, and you can do nothing about that. I usually let the program delete them by pressing Y (for Yes):

    7.      Finally you can ask for a thorough disk check, where errors are corrected automatically. Then use the command:

    chkdsk c: /f /r[n29] 

    8.      Here you may often experience that Chkdsk cannot check the harddisk, while the Windows programs are active. Then you can run the check next time you start the pc’en (as in Figure 90).

    If you accidentally turn off power to your pc without closing Windows XP, Windows XP will often run Chkdsk on the next start-up.

    Figure 90. The harddisk is checked at pc start-up.


    Another problem with the harddisk’s file system is fragmenting. This means that individual files are frag­mented in smaller bits. Then the files are scattered randomly across the whole hard disk, and that is certainly not desireable.

    The harddisk gets slower, and errors in the file system are more likely to occur when there are many frag­men­­ted files. So it is a good thing to defrag­men­t routinely. But be aware that this operation can take a long time with large hard disks.

    The Windows XP Disk­ defrag­men­ting tool is improved compared to earlier versions. The tool defragments, but the files are at the same time placed in the optimale sequence on the harddisk. Then the reading of programs that you have installed, such as Word, can be executed faster (at least that is the theory).

    1.      Open the Diskdefragmenting tool, which is found in the Start menu. Slect All Programs ŕ Accessories ŕ System Tools.

    2.      Start by selecting your C drive. Then click on the Analyze button:

    3.      The analysis tells you if the drive needs de­frag­menting. That is the case here, so I click on the Defragment button:

    4.      Then the defragmenting process starts. Which might take a long time to dot. If the harddisk is big, you could let the program run during the night.

    Figure 91. Disk defragmenting optimizes the harddisk by moving files and file framents around.

    Disk maintenance conclusion

    First use Disk cleanup, then Chkdsk, and then Diskdefrag­men­ting. Use the three tools routinely – as an absolute minimum a couple of times a year.

    Besides you need at least 15% free space on a disk drive, before the drive can be defragmented. So delete unneeded files before you try to defragment. Since an overfilled disk fragments very fast, it is always a good idea to have much vacant disk space. The disk just works better that way.

  • Next chapter.
  • Previous chapter.

  • Book overview.