• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Check the disk for errors and fix any that are found (replacesScandisk).

To Open

Command Prompt chkdsk


chkdsk [drive[filename]] [/f] [/r] [/x] [/i] [/c] [/v]


Chkdsk scans thedisk surface, checks the integrity of files and folders, and looks for lost clusters (among other things), correcting any problems that are found and sometimes even freeing disk space consumed by unusable fragments of data.

If you run Chkdsk with no command-line parameters, it will check the current drive for errors. Or, specify a drive letter to check a specific drive, like this:

chkdsk e:

However, Chkdsk run this way will only report problems — it won't correct them. The report you'll get looks something like this:

The type of the file system is NTFS.
Volume label is Hard Disk.
WARNING!  F parameter not specified.
Running CHKDSK in read-only mode.
CHKDSK is verifying files (stage 1 of 3)...
File verification completed.
CHKDSK is verifying indexes (stage 2 of 3)...
Index verification completed.
CHKDSK is verifying security descriptors (stage 3 of 3)...
Security descriptor verification completed.
Correcting errors in the Volume Bitmap.
Windows found problems with the file system.
Run CHKDSK with the /F (fix) option to correct these.
  29302528 KB total disk space.
   2997136 KB in 19467 files.
      5132 KB in 1320 indexes.
         0 KB in bad sectors.
     94368 KB in use by the system.
     65536 KB occupied by the log file.
  26205892 KB available on disk.

      4096 bytes in each allocation unit.
   7325632 total allocation units on disk.
   6551473 allocation units available on disk.

The report starts with a warning about the /f parameter (see below), followed by descriptions of the stages of the scan. Note that an error has been found, but according to the report, it wasn't fixed. Next comes the summary of the total disk space, used space, and other statistics, which are fairly self-explanatory.

To use Chkdsk effectively, you'll need to use the following optional parameters:


Fix any errors found. If /f is omitted, errors are merely reported and no changes to the disk are made.


Locates bad sectors and recovers readable information. Using the /r parameter implies /f (see above). Think of the /r parameter as a beefed-up version of /f. Keep in mind that bad sectors represent physical errors on the disk surface, and safe recovery of the data residing in those areas is not guaranteed. Only use the /r option if you have reason to believe you have one or more bad sectors, either because Chkdsk is reporting this problem or if you encounter another symptom, such as your computer crashing or freezing every time you attempt to access a certain file.


Forces the volume to dismount before the scan is performed. Using the /x parameter implies /f (see above). This effectively disconnects the drive from Explorer and all other programs, closing any open files stored on the drive, before any changes are made. You may wish to use this option when checking or repairing a shared drive used frequently by the several users on a network; otherwise, access to the drive might interrupt Chkdsk, or even corrupt data further.


Performs a less vigorous check of index entries. The /i option can be used only on NTFS disks, as index entries only exist on NTFS volumes. Typically, you'll probably never need this option, although you may choose to use it to reduce the amount of time required to check the disk.


Skips checking of cycles within the folder structure. Like /i, the /c option can be used only on NTFS disks. Likewise, you'll probably never need this option either, although you may choose to use it to reduce the amount of time required to check the disk.


Use of the /v parameter abandons Chkdsk's primary purpose, and instead simply displays a list of every file on the entire hard disk (in no particular order). Note that the /v parameter can be used only on a disk with a FAT or FAT32 file system; it has no meaning on an NTFS disk.


  • Chkdsk can also be used to check a single file or a specific group of files for fragmentation (see Disk Defragmenter, later in this chapter), but only on FAT or FAT32 disks. To do this, specify the full path and filename (or use wildcards, such as *.*, to specify multiple files) instead of the drive letter on the command line.

  • In Windows 9x/Me, regular usage of Scandisk was recommended, but that's not necessarily the case with Chkdsk and Windows XP. Whenever Windows isn't properly shutdown, or when Windows detects a potential problem during startup, Chkdsk is run automatically during the boot process. Additionally, given the added stability of Windows XP, you may not ever need to run Chkdsk manually unless you suspect a problem.

  • When Chkdsk is launched during Windows startup, it is preceded by a message and a 10-second delay, giving you the option of skipping the scan. While Chkdsk is running, either during Windows startup or any other time, it can be corrupted by pressing Ctrl-C.

  • During normal use of Chkdsk, you'll see references to various terms describing problems on your hard disk. Among the more popular players are lost clusters (pieces of data no longer associated with any file), bad sectors (actual flaws in the disk surface), cross-linked files (two files claiming ownership of the same chunk of data), invalid file dates and filenames, and a few other more obsure errors.

  • The /v parameter is a funny option, especially considering it has very little to do, at least in terms of results, with the other functions of this program. However, when used in conjunction with pipe operators (see Appendix C), this feature can generate filtered reports of the contents of a drive.

  • If you wish to schedule Chkdsk at regular intervals to help ensure a healthy disk, you can configure the Task Scheduler (discussed later in this chapter) to run Chkdsk, say, every Friday at 3:30.

See Also


  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint