Microsoft DOS chkdsk command

Quick links

About chkdsk
Availability
Chkdsk syntax
Examples

About chkdsk

Chkdsk is a utility that checks the computer's hard drive status for any cross-linked or any additional errors with the hard drive.

MS-DOS versions 2.x - 4.x used chkdsk.com,
MS-DOS versions 5.x and beyond used chkdsk.exe.

Availability

The chkdsk command is an external command and is available in the below Microsoft operating systems.

All Versions of MS-DOS
Windows 95
Windows 98
Windows ME
Windows NT
Windows 2000
Windows XP
Windows Vista
Windows 7
Windows 8

Syntax

Windows 8 syntax
Windows Vista and Windows 7 syntax
Windows 2000 and Windows XP syntax
Windows 2000 and Windows XP recovery console syntax
Windows 98 and earlier syntax

Windows 8 syntax

Checks a disk and displays a status report.

CHKDSK [volume[[path]filename]]] [/F] [/V] [/R] [/X] [/I] [/C] [/L[:size]] [/B] [/scan] [/spotfix]

volume Specifies the drive letter (followed by a colon), mount point, or volume name.
filename FAT/FAT32 only: Specifies the files to check for fragmentation.
/F Fixes errors on the disk.
/V On FAT/FAT32: Displays the full path and name of every file on the disk.
On NTFS: Displays cleanup messages if any.
/R Locates bad sectors and recovers readable information (implies /F).
/L:size NTFS only: Changes the log file size to the specified number of kilobytes. If size is not specified, displays current size.
/X Forces the volume to dismount first if necessary. All opened handles to the volume would then be invalid (implies /F).
/I NTFS only: Performs a less vigorous check of index entries.
/C NTFS only: Skips checking of cycles within the folder structure.
/B NTFS only: Re-evaluates bad clusters on the volume (implies /R)
/scan NTFS only: Runs an online scan on the volume.
/forceofflinefix NTFS only: (Must be used with "/scan") Bypass all online repair; all defects found are queued for offline repair (i.e. "chkdsk /spotfix").
/perf NTFS only: (Must be used with "/scan") Uses more system resources to complete a scan as fast as possible. This may have a negative performance impact on other tasks running on the system.
/spotfix NTFS only: (Must be used with "/scan") Uses more system resources to complete a scan as fast as possible. This may have a negative performance impact on other tasks running on the system.
/sdcleanup NTFS only: Garbage collect unneeded security descriptor data (implies /F).
/offlinescanandfix Runs an offline scan and fix on the volume.

The /I or /C switch reduces the amount of time required to run Chkdsk by skipping certain checks of the volume.

Windows Vista and Windows 7 syntax

Checks a disk and displays a status report.

CHKDSK [volume[[path]filename]]] [/F] [/V] [/R] [/X] [/I] [/C] [/L[:size]] [/B]

volume Specifies the drive letter (followed by a colon), mount point, or volume name.
filename FAT/FAT32 only: Specifies the files to check for fragmentation.
/F Fixes errors on the disk.
/V On FAT/FAT32: Displays the full path and name of every file on the disk.
On NTFS: Displays cleanup messages if any.
/R Locates bad sectors and recovers readable information (implies /F).
/L:size NTFS only: Changes the log file size to the specified number of kilobytes. If size is not specified, displays current size.
/X Forces the volume to dismount first if necessary. All opened handles to the volume would then be invalid (implies /F).
/I NTFS only: Performs a less vigorous check of index entries.
/C NTFS only: Skips checking of cycles within the folder structure.
/B NTFS only: Re-evaluates bad clusters on the volume (implies /R)

The /I or /C switch reduces the amount of time required to run Chkdsk by skipping certain checks of the volume.

Windows 2000 and Windows XP chkdsk syntax

Checks a disk and displays a status report.

CHKDSK [volume[[path]filename]]] [/F] [/V] [/R] [/X] [/I] [/C] [/L[:size]]

volume Specifies the drive letter (followed by a colon), mount point, or volume name.
filename FAT only: Specifies the files to check for fragmentation.
/F Fixes errors on the disk.
/V On FAT/FAT32: Displays the full path and name of every file on the disk.
/R Locates bad sectors and recovers readable information (implies /F).
/L:size NTFS only: Changes the log file size to the specified number of kilobytes. If size is not specified, displays current size.
/X Forces the volume to dismount first if necessary. All opened handles to the volume would then be invalid (implies /F).
/I NTFS only: Performs a less vigorous check of index entries.
/C NTFS only: Skips checking of cycles within the folder structure.

The /I or /C switch reduces the amount of time required to run Chkdsk by skipping certain checks of the volume.

Microsoft Windows 2000 and Windows XP users who have NTFS should also consider using the CHKNTFS command.

Windows 2000 and Windows XP recovery console syntax

Note: The below options are only available in the recovery console.

Checks a disk and displays a status report.

chkdsk [drive:] [/p] | [/r]

[drive:] Specifies the drive to check.
/p Check even if the drive is not flagged dirty, bad.
/r

Locates bad sectors and recovers readable information (implies /p).

Chkdsk may be used without any parameters, in which case the current drive is checked with no switches. You can specify the listed switches.

Chkdsk requires the Autochk.exe file. Chkdsk automatically locates Autochk.exe in the startup (boot) directory. If it cannot be found in the startup directory, chkdsk attempts to locate the Windows 2000 Setup CD. If the installation CD cannot be found, chkdsk prompts for the location of Autochk.exe.

Windows 98 and earlier syntax

Checks a disk and displays a status report.

CHKDSK [drive:][[path]filename] [/F] [/V]

[drive:][path]  Specifies the drive and directory to check.
filename Specifies the file(s) to check for fragmentation.
/F Fixes errors on the disk.
/V Displays the full path and name of every file on the disk.

Type CHKDSK without parameters to check the current disk.

Examples

chkdsk

Displays all information described above and also report any crossed linked files.

chkdsk /f

Will fix any crossed linked files; however, do not run this command while you are in Windows95 or Windows 3.x

Additional information