The chkdsk command line tool was included in earlier MS-DOS versions of Microsoft operating systems. From Windows NT 3.1 and higher, chkdsk runs as a 32-bit program that also supports NTFS format disks. From Windows XP and higher, the tool includes a disk scanning feature with a simple graphical interface that uses the disk service in the back­ground but offers only two of the service's many options. In the following article, you’ll learn about the different chkdsk commands and para­met­ers that are available and how to use the tool for your purposes.

Cheap domain names – buy yours now
  • Free website pro­tec­tion with SSL Wildcard included
  • Free private re­gis­tra­tion for greater privacy
  • Free Domain Connect for easy DNS setup

You can run chkdsk as follows:

  • Run chkdsk from the disk check utility in the File Explorer
  • Run chkdsk with the full range of features from the command line (Command Prompt or Power­Shell)

How to run chkdsk from the disk check utility

To run chkdsk from the File Explorer, right-click a drive and select Prop­er­ties from the context menu. Then go to the Tools tab. In the “Error Checking” section, click the Check button:

After a short scan, Windows 10 auto­mat­ic­ally suggests necessary repairs (in Windows 7, the repair options had to be selected manually). You can choose from two options:

  • Auto­mat­ic­ally fix file system errors – cor­res­ponds to chkdsk parameter /f.
  • Scan for and attempt recovery of bad sectors – cor­res­ponds to chkdsk parameter /r.

If you choose one of the above repair options, the required time will increase sig­ni­fic­antly. In addition, you can’t use the drive while it is being checked. Therefore, you should first close all programs and File Explorer windows that are accessing or dis­play­ing data from this drive.

You also shouldn’t access the drive in read-only mode while the check is running, otherwise the time required for the check will be much longer. It’s best to close all programs and disable third-party antivirus software to prevent them from per­form­ing tasks in the back­ground.

How to run chkdsk from the command line with the full range of features

If you run chkdsk from the command line, you have many more scanning options than if you use the File Explorer. In Windows 10, you can type in the chkdsk commands using either Command Prompt or the new Power­Shell. You do not have the Power­Shell option in older versions of the operating system such as Windows 7 or Windows 8. The following step-by-step guide shows you exactly how to control the tool via the command line.

  1. First, close all windows dis­play­ing the drive you want to check, and exit any programs that might be accessing the drive.
  2. Right-click the Windows logo in the taskbar to open the Start menu. Next, choose Command Prompt (Admin) or Windows Power­Shell (Admin). Depending on your Windows version, only one of these options will appear in the menu.
  3. If you’re logged on as a user with re­stric­ted per­mis­sions, you have to enter the ad­min­is­trat­or password at this point.
  4. Enter chkdsk and the letter of the drive you want to check.

chkdsk will then run in read-only mode without any further para­met­ers, meaning it won’t change anything on the hard drive.

You can use ad­di­tion­al chkdsk para­met­ers to enable special check phases or repair options. Use the following basic syntax when you enter the chkdsk commands:

chkdsk [drive[[path]file name]]] [/F] [/V] [/R] [/X] [/I] [/C] [/L[:size]] [/B] [/scan] [/spotfix]

If you don’t select a drive, chkdsk will run on the currently selected drive. You can specify the drive using the drive letter, or for NTFS drives, you can specify the path of the directory that includes another disk.

On FAT32 drives, you can check in­di­vidu­al dir­ect­or­ies or even specific files. On NTFS drives, you can only specify a directory if the directory appears with its own partition in the directory tree.

The most important chkdsk commands and para­met­ers at a glance

The following table sum­mar­ises the most important chkdsk para­met­ers and commands and explains their meaning. It also specifies the file system and version of Windows for which the different commands are available.

chkdsk command/parameter Meaning FAT32 / extFAT NTFS As of Windows version
Volume Specifies the drive letter or volume (followed by a colon) or the mount point x x  
File name Specifies the name of the files you want to check x    
/F Fixes errors on the disk x x  
/V Displays the full path and name of every file on the drive x    
/V Displays any clean-up messages   x  
/R Finds damaged sectors and recovers readable in­form­a­tion (implies /F if /scan is not specified) x x  
/L:size Changes the log file size to the number of KBs you specify. If you do not specify the size, the current size is displayed   x  
/X Forces the volume to dismount. All open process on the volume are then in­val­id­ated. (Implies /F) x x  
/I Runs a check of index entries (less vigorous)   x  
/C Cycles within the folder structure are not checked   x  
/B Rechecks all bad clusters on the volume (implies /R)   x Windows 7
/scan Runs an online check   x Windows 10
/for­ceoff­line­fix Bypasses online repair (must be used with /scan); errors found are queued for offline repair (i.e. chkdsk /spotfix)   x Windows 10
/perf Uses more system resources to speed up veri­fic­a­tion; can have a negative impact on the per­form­ance of other tasks running on the system (must be used with /scan)   x Windows 10
/spotfix Repairs the volume   x Windows 10
/sdcleanup Runs a memory clean-up for unneeded security descriptor data (implies /F)   x Windows 10
/off­lines­canand­fix Runs an offline check and fix on the volume x x Windows 10
/free­orphaned­chains Frees unneeded cluster chains instead of re­cov­er­ing their contents x   Windows 10
/markclean Marks the volume clean x   Windows 10

If chkdsk runs with one of the repair options (/F or /R), the time required for the check usually increases sig­ni­fic­antly. Even in the default read-only mode, you should access the hard drive as little as possible while running chkdsk. You can abort chkdsk at any time using the keyboard shortcut Ctrl + C.

The /I and /C options reduce the time it takes to run chkdsk because they skip some checks.

Note

Files are always open on the system drive, so chkdsk cannot run with the repair options on this drive. In this case, you can use AutoChk to check the system drive the next time you start your computer.

Go to Main Menu