Chkdsk is an excellent utility for scanning and fixing disk errors. Here are all the chkdsk commands you should know to use the tool effectively.
When your computer crashes or unexpectedly shuts down, Windows may launch a disk recovery tool called Chkdsk, better known as the Check Disk.
The Chkdsk tool, as the name implies, examines the hard disk for problems and attempts to repair them while recovering as much data as possible. Furthermore, the chkdsk program can recover data in the event of BSOD (Blue Screen of Death) errors, bad sectors in a damaged or old hard drive, cluster problems, file system failures, and so on.
Simply put, chkdsk is a handy utility that makes your life easier when things go wrong. Generally, Windows automatically runs the chkdsk tool as and when needed. However, you can also run the chkdsk tool manually. If you ever want to do that, it is better to know all the essential chkdsk commands. That way, you can run the exact commands you need to scan and fix drive errors in Windows.
I’m listing all the chkdsk commands and their usage to get you started. Execute the relevant command depending on your use case, and chkdsk will do the rest.
Table of contents:
List of Chkdsk Commands
Chkdsk includes a number of command-line options to help you execute the utility correctly and efficiently. All of the chkdsk commands and their meanings are listed here.
Volume – This parameter allows you to specify a drive letter or volume name to scan. For example, you’d use
D: to scan the D drive.
Filename – This parameter scans for fragmentation in a specific file. This parameter is only applicable to the FAT and FAT32 file systems. In practice, you won’t use this parameter very often.
/F – Use this parameter to have chkdsk automatically repair errors discovered while scanning.
/R – This switch searches for bad sectors and, if possible, restores readable data.
/L:size – This switch only applies to the NTFS file system. It allows you to change the size of the NTFS transaction file log. In general, this is only for server administrators.
/X – This switch force unmounts the target drive or volume to invalidate active handles. Sometimes, if the volume is mounted, it can cause problems with scanning and recovering. You can use this switch to unmount and perform the scan in those situations. Unless you know what you are doing, please don’t use this switch because it can cause program crashes and data loss under certain circumstances.
/I – This switch makes the index scan less vigorous. You can use this switch while doing low-priority scans or when you are short on time. Also, this switch works only on the NTFS file system.
/C – This, like the previous switch, only works with the NTFS file system. It will bypass cycle checking with the folder structure.
/B – This parameter instructs the chkdsk utility to re-evaluate the bad clusters on a specified volume.
/Scan – This parameter performs an online scan and only applies to the NTFS file system.
/ForceOfflineFix – This parameter instructs the chkdsk utility to execute an offline repair rather than an online repair. If you use this switch, it should be used in conjunction with the
/Pref – This parameter increases the chkdsk priority to run the scans as fast as possible at the cost of higher system resource usage. This parameter can cause other programs to slow down due to limited resources. This switch works only on the NTFS file system and should be used alongside the
/Spotfix – As the name suggests, this parameter tries to spot-fix problems found in the volume. Works only in the NTFS file system.
/SdCleanup – Garbage collects Security Descriptor data. Works only in the NTFS file system.
/OfflineScanAndFix – This parameter forces the chkdsk tool to run an offline scan and fix the problems offline.
/FreeOrphanedChains – This parameter frees up orphaned chains rather than try and recover their data. Works only on FAT, FAT32, and exFAT file systems.
/MarkClean – This parameter marks the scanned volume as clean if there are no errors. Works only on FAT, FAT32, and exFAT file systems.
How to Run Chkdsk Commands
The chkdsk command is very simple to use. All you need to do is type the
chkdsk keyword, the drive letter or path, any other parameters, and press the Enter button.
The base chkdsk command looks like this.
chkdsk [volume[[path]filename]]] [/F] [/V] [/R] [/X] [/I] [/C] [/L[:size]] [/B] [/scan] [/spotfix]
If you’re curious, everything between the square brackets () is optional. To scan the D drive, for example, run
chkdsk D: without any other parameters.
To make things easier, I’ll show you the most popular and useful chkdsk commands. These instructions will assist you in scanning and repairing your drive, partition, file, or folder.
First and foremost, open Command Prompt as administrator. After that, run the chkdsk instructions given below as needed.
Chkdsk command to scan an entire drive/partition
Use the following command to scan a specific drive or partition. Of course, replace
<driveLetter> with your desired drive letter. To scan the “C” drive, for example, replace
Chkdsk command to scan and recover data
To check and repair a disk, you can use the below command. Like before, you can replace
<driveLetter> with the actual drive letter of your choice.
chkdsk <driveLetter>: /F /R
That is all. It is that simple to get a list of all chkdsk commands and how to use them. For more information, visit the official URL below for more details on the chkdsk utility.
I hope this simple and easy Microsoft guide helped you.
If you are stuck or need some help, send an email, and I will try to help as much as possible.