Repairing corrupted files with Command Prompt CHKDSK tool

Repairing corrupted files in Windows computers can be done with the Command Prompt check disk tool (CHKDSK).

Using Command Prompt

Open Command Prompt (that famous black window). The term “command prompt” also refers to the right angle bracket (>) that indicates the command line interface can accept commands. Command Prompt lines are case-insensitive, so it does not matter if you use upper or lower cases.

If you never opened Command Prompt before, just click the Start icon located in the task bar and search for it. Locate the Command Prompt icon and pin it to the Start menu and to the task bar so from now on the tool is accessible from both locations.

Using CHKDSK

To run the tool on files located in a given drive, said drive should not be in use, otherwise Command Prompt will ask you if you want to run the tool the next time you restore the computer.

To open the tool as an administrator, press Ctrl + Shift and at the same time click the Command Prompt icon.

Enter chkdsk /? to check for all available flags. Then use a flag by entering

chkdsk [letter]: [/flag]

You may enter a combination of flags if you want, but note that the combination /f/r is unnecessary as /r summons /f by default.

Some Examples

Let’s present now some illustrative examples. To check and repair files from a USB located in the E drive, use the /r flag by entering chkdsk e: /r

By contrast, to check and repair files located in the C drive, which is in use by default, enter chkdsk c: /r. Because the C drive is in use by default, Command Prompt will display the following message:

Chkdsk cannot run because the volume is in use by another
process. Would you like to schedule this volume to be
checked the next time the system restarts? (Y/N)

Press Y and restart the computer to run a check. You may want to do something else during a run as it might be time-consumming.

The tool does some forensic work on old and new computers. Below is a report for an old computer using a USB as drive E.

C:\Windows\system32>chkdsk e: /r
The type of the file system is FAT32.
Volume Serial Number is CAE7-70C1
Windows is verifying files and folders…
File and folder verification is complete.
Windows is verifying free space…
Free space verification is complete.
Windows has checked the file system and found no problems.
30,029,472 KB total disk space.
66,096 KB in 1,001 hidden files.
205,696 KB in 12,773 folders.
20,869,504 KB in 121,760 files.
8,888,160 KB are available.

16,384 bytes in each allocation unit.
1,876,842 total allocation units on disk.
555,510 allocation units available on disk.

Leave a comment