CHKDSK to Fix Disk Error

Running Check Disk from the Command Line

You can run Check Disk from an elevated command prompt or within other tools. At the elevated command prompt, you can test the integrity of drive C by typing the following command:
CHKDSK C:
Check Disk then performs an analysis of the disk and returns a status message regarding any problems it encounters.Unless you specify further options, Check Disk won’t repair problems, however.To find and repair errors on drive C, use this command: 

CHKDSK /f C:

When you use this command, Check Disk performs an analysis of the disk and then repairs any errors it finds, provided that the disk isn’t in use. If the disk is in use, Check Disk displays a prompt that asks whether you want to schedule the disk to be checked the next time you restart the system. Click Yes to schedule this check. 

The complete syntax for Check Disk is as follows: 

CHKDSK [volume[[path]filename]] [/F] [/V] [/R] [/X] [/I] [/C] [/L[:size]]
The options and switches for Check Disk are used as follows: 
volume Sets the volume to work with  path/filename Specifies files to check for fragmentation (FAT16 and FAT32 only) 
  • /F Fixes errors on the disk 
  • /V Displays the full path and name of every file on the disk (FAT16 and FAT32); displays cleanup messages if any (NTFS) 
  • /R Locates bad sectors and recovers readable information (implies /F) 
  • /X Forces the volume to dismount first if necessary (implies /F) 
  • /I Performs a minimum check of index entries (NTFS only) 
  • /C Skips checking of cycles within the folder structure (NTFS only) 
  • /L:size Sets the log file size (NTFS only) 
  • /B Re-evaluates bad clusters on the volume (NTFS only; implies /R)