chkdsk
Checks the file system and file system metadata of a volume for logical and physical errors. Windows commands reference
On Windows File chkdsk.exe
Windows
Checks the file system and file system metadata of a volume for logical and physical errors. If used without parameters, chkdsk displays only the status of the volume and doesn't fix any errors. If used with the /f, /r, /x, or /b parameters, it fixes errors on the volume. IMPORTANT: Membership in the local Administrators group, or equivalent, is the minimum required to run chkdsk. To open a command prompt window as an administrator, right-click Command prompt in the Start menu, and then select Run as administrator. IMPORTANT: Interrupting chkdsk isn't recommended. However, canceling or interrupting chkdsk shouldn't leave the volume any more corrupt than it was before chkdsk was run. Running chkdsk again checks and should repair any remaining corruption on the volume. NOTE: Chkdsk can be used only for local disks. The command can't be used with a local drive letter that has been redirected over the network. - The /i or /c switch reduces the amount of time required to run chkdsk by skipping certain volume checks. - If you want chkdsk to correct disk errors, you can't have open files on the drive. If files are open, the following error message appears: - If you choose to check the drive the next time you restart the computer, chkdsk checks the drive and corrects errors automatically when you restart the computer. If the drive partition is a boot partition, chkdsk automatically restarts the computer after it checks the drive. - You can also use the chkntfs /c command to schedule the volume to be checked the next time the computer is restarted. Use the fsutil dirty set command to set the volume's dirty bit (indicating corruption), so that Windows runs chkdsk when the computer is restarted. - You should use chkdsk occasionally on FAT and NTFS file systems to check for disk errors. Chkdsk examines disk space and disk use and provides a status report specific to each file system. The status report shows errors found in the file system. If you run chkdsk without the /f parameter on an active partition, it might report spurious errors because it can't lock the drive. - Chkdsk corrects logical disk errors only if you specify the /f parameter. Chkdsk must be able to lock the drive to correct errors. …
chkdsk [<volume>[[<path>]<filename>]] [/f] [/v] [/r] [/x] [/i] [/c] [/l[:<size>]] [/b] [/scan] [/forceofflinefix] [/perf] [/spotfix] [/sdcleanup] [/offlinescanandfix] [/freeorphanedchains] [/markclean] [/?]
To check the disk in drive D and have Windows fix errors, type
chkdsk d: /fIdentify/fFixes errors on the disk. Windows commands referenceTo check all files on a FAT disk in the current directory for noncontiguous blocks, type
chkdsk *.*IdentifyShow 19 options
<volume>Specifies the drive letter (followed by a colon), mount point, or volume name.[<path>]<filename>Use with file allocation table (FAT) and FAT32 only. Specifies the location and name of a file or set of files that you want chkdsk to check for fragmentation. You can use the wildcard characters ? and * to specify multiple files./fFixes errors on the disk. The disk must be locked. If chkdsk can't lock the drive, a message appears that asks you if you want to check the drive the next time you restart the computer./vDisplays the name of each file in every directory as the disk is checked./rLocates bad sectors and recovers readable information. The disk must be locked. /r includes the functionality of /f, with the additional analysis of physical disk errors./xForces the volume to dismount first, if necessary. All open handles to the drive are invalidated. /x also includes the functionality of /f./iUse with NTFS only. Performs a less vigorous check of index entries, which reduces the amount of time required to run chkdsk./cUse with NTFS only. Doesn't check cycles within the folder structure, which reduces the amount of time required to run chkdsk./l[:<size>]Use with NTFS only. Changes the log file size to the size you type. If you omit the size parameter, /l displays the current size./bUse with NTFS only. Clears the list of bad clusters on the volume and rescans all allocated and free clusters for errors. /b includes the functionality of /r. Use this parameter after imaging a volume to a new hard disk drive./scanUse with NTFS only. Runs an online scan on the volume./forceofflinefixUse with NTFS only (must be used with /scan). Bypass all online repair; all defects found are queued for offline repair (for example, chkdsk /spotfix)./perfUse with NTFS only (must be used with /scan). Uses more system resources to complete a scan as fast as possible. This might have a negative performance impact on other tasks running on the system./spotfixUse with NTFS only. Runs spot fixing on the volume./sdcleanupUse with NTFS only. Garbage collect unneeded security descriptor data (implies /f)./offlinescanandfixRuns an offline scan and fix on the volume./freeorphanedchainsUse with FAT/FAT32/exFAT only. Frees any orphaned cluster chains instead of recovering their contents./markcleanUse with FAT/FAT32/exFAT only. Marks the volume clean if no corruption was detected, even if /f wasn't specified./?Displays help at the command prompt.Windows
Check filesystem and volume metadata for errors.
Specify the drive letter (followed by a colon), mount point, or volume name to check
chkdsk volumeIdentifyFix errors on a specific volume
chkdsk volume /fIdentify/fFixes errors on the disk. Windows commands referenceDismount a specific volume before checking
chkdsk volume /xIdentify/xForces the volume to dismount first, if necessary. Windows commands referenceChange the log file size to the specified size (only for NTFS)
chkdsk /lsizeIdentify