All modern Windows operating systems provide the
chkdsk command which is used to check file system and file system metadata for hard drives and volumes. If there are errors about file systems and file system metadata they can be also fixed by using the chkdsk command.
chkdsk Command Syntax
The chkdsk command has the following syntax where the disk, volume, or partition name is provided after the command. The options are added to the end of the line.
chkdsk VOLUME OPTIONS
- VOLUME is the volume, partition or disk we want to perform check.
- OPTIONS is single or more options to decide type of check and behaivour.
chkdsk Command Options
The chkdsk command provides different options to perform different disk checks. Below you can find some of the most popular and useful options about the chkdsk command.
|/F||Fix any error found on the specified disk|
|/V||Show the full path and name of every file on the disk for the FAT and FAT32 file systems.|
|/R||Locate bad sectırs and recover any readable data and information. This option implicitly refers /F when /scan is not specified.|
|/X||This option implies /F and force unmount of the volume if the unmount is required.|
|/I||Make the check faster and skip some complex checks|
|/C||Same as /I but also skips over cycles within the folder structure to reduce check time.|
|/L:SIZE||Set the size of the log file. By default, the log file size is specified as 65536 KB.|
|/perf||Perform faster check by using more system resources in performance mode|
|/scan||Scan the specified disk and volume but do not repair errors. It is also named an online scan as it does not requires unmount of the specified disk or volume.|
|/spotfix||Unmount disks and volumes to fix when an error is found and then mount them again|
|/?||Display help information about the chkdsk with options and their meanings|
Open MS-DOS or Command Prompt as Administrator
The chkdsk command is a system command which works on volumes, disks, and partitions. The execution of the chkdsk command requires Administrative privileges. So in order to run the chkdsk command from the command-line interface, the MS-DOS or Command Prompt should be opened as Administrator. The command prompt can be opened as Administrator via the Start menu typing “cmd” and then clicking
Run as administrator like below.
Alternatively, the following post explains different ways to open Command Prompt as an Administrator.
Run chkdsk Readonly Mode
The chkdsk command can be executed in a read-only mode where only a check is performed but not a fix is applied. If we do not provide any option and disk it checks the currently active drive-in read-only mode like below.
Perform Extensive Check
/R option is used to perform extensive checks and recover any found errors and fix them. The founded bad sectors and related information are recovered. In the following example, we specify the volume “D:”. The in order to apply fixes the volume should be dismounted.
> chkdsk D: /R
Perform Online Check
It is not always possible to unmount the disk for an error check. The online check can be performed on a disk that is mounted and used. The
/scan option is used to scan online and
/forceofflinefix option is used to fix found errors when the disk is offline like during reboot.
> chkdsk C: /scan /forceofflinefix
Perform Disk Checks Faster
By default, the chkdsk command uses little system resources. But we can increase the allocated system resources to the chkdsk command in order to run the disk check faster. The
/perf option is used to perform disk check faster with the chkdsk command.
> chkdsk C: /R /SCAN /PERF
The chkdsk command is also provided by a simple GUI tool named
Error Checking via the Disk Tools. First right click to the disk we want to check.
Local Disk Properties click to the
Check button which is located under the
The chkdsk command GUI is opened which is named
Error Checking Local Disk like below. there click to the
Scan drive button like below.
During the check the following screen is displayed which provides information about the disk scan and check.
After the check and fix are completed successfully the following result screen is displayed where information about the found and fixed errors are displayed.
Display chkdsk Help Information
Help information and options list for the chkdsk command can be displayed with the
/? option like below.