Command: chkdsk

  CHKDSK checks a drive for errors, and optionally attempt to fix them.
  It also gives a detailed analysis of the disk's size and structure.

Syntax:

  Chkdsk [volume] [/f] [/d files] [/r] [/s] [/v] [/?]

Options:

  /f  attempt to fix any errors found.
  /d  print out the indicated files and show the fragmentation factor.
  /r  scan the data area and try to recover unreadable data.
  /s  only show drive summary.
  /v  show file name as it is being checked.
  /?  Shows the help.

Comments:

  volume    The disk, drive or partition that you wish to check,
            for instance: chkdsk a: Would check the A drive. If
            no volume is given, the current drive is assumed.
  /f        Tells chkdsk to attempt to fix any errors.
  /d files  This will list the level of fragmentation for
            each file. If many files are very fragmented then
            disk operation can be slow. You can defragment your
            disk drive with defrag.
            This option also lists the file attributes for each
            file, see attrib for more information about file
            attributes.
  /r        Scans for and attempts to recover data. This may need
            a long time!
  /s        Tells chkdsk not to check the drive, but only to
            display the drive analysis.
  /v        This lists the files as they are being checked.
            Note that this can slow things down, especially if
            there are many files.
  CHKDSK supports FAT16 only! For FAT32 please try DOSFSCK.
  CHKDSK has the following ERRORLEVEL (EXITCODES):
  0         drive okay
  255       error found

Examples:

  chkdsk /f c:

See also:

  attrib
  bootfix
  defrag
  dosfsck
  errorlevel/exitcodes
 (scandisk)

  Copyright © 2004 Robert Platt, updated 2011 and 2022 by W. Spiegl.

  This file is derived from the FreeDOS Spec Command HOWTO.
  See the file H2Cpying for copying conditions.