There is nothing more frustrating than being unable to open a corrupt personal file or folder containing crucial data. Likewise, corrupt operating system files can lead to serious performance issues or even a complete system failure.

There are countless reasons why files and folders become corrupt, such as malware attacks, improper file relocation, bad sectors on your hard drive, and unending computer crashes.

Hold your patience if your system or app files have become corrupted; it's not impossible to fix them. In this article, we will show you how to use the built-in tools on Windows to get your files working again.

1. Run the SFC Scan to Repair Corrupt System Files

SFC, or System File Checker, is a godsend command-line utility that comes to our rescue when encountering corrupted system files. You need to run a simple command in the Command Prompt app, and it will automatically find and replace corrupt files with the cached copy.

To run an SFC scan, follow the below steps:

  1. Enter "cmd" in the Windows search bar.
  2. Right-click on Command Prompt and select Run as administrator.
  3. Enter the command "SFC /scannow" and press Enter. (Be sure to add a space between "SFC" and "/scannow")
    SFC Scan Complete in Windows Command Prompt

That's it. The command-line utility will begin processing the system files, and depending on the data, the process may take longer. So, minimize the Command Prompt app and continue working on your projects.

How to Analyze the Result of SFC Scan

As the SFC scan completes its process, you will be presented with one of four possible outcomes, as explained on the Microsoft blog:

  1. Windows Resource Protection did not find any integrity violations: According to this result, your system files are clean, and no corrupt files were found during the scan. Therefore, if the file you're trying to access is still corrupt, resulting in system errors, there may be another problem.
  2. Windows Resource Protection could not perform the requested operation: A result like this indicates that the SFC scan is unable to complete, and Microsoft recommends running the SFC scan in Safe mode. Before doing that, press Win + R and type %WinDir% \WinSxS\Temp and click OK. The "PendingDeletes" and "PendingRenames" folders should be intact in the Windows Temp folder when running the SFC scan in Safe mode.
  3. Windows Resource Protection found corrupt files and successfully repaired them: Corrupt files have been repaired automatically, so nothing needs to be done.
  4. Windows Resource Protection found corrupt files but was unable to fix some of them: In this case, you will have to locate and repair the files manually. Refer to the More Information section of the Microsoft Blog to learn how you can do this.

How to Run the SFC Scan for Other Drives

An SFC scan isn't limited to repairing system files. It can also be run on other drives and external storage devices. To accomplish this, you need to run the following command in the Windows Command Prompt:

        SFC/scannow/offbootdir=drivename /offwindir=drivename:\windows
    

2. Use the DISM Tool to Diagnose Issues With Local System Images

As a general rule, an SFC scan should help you fix corrupt system files. There are times when an SFC scan may not identify the problem, or you may not be able to run it at all. If you encounter these scenarios, you should use DISM to repair the system image.

To repair the system image using DISM, follow these steps:

  1. In the Windows search bar, type "cmd" and open Command Prompt as administrator.
  2. Enter the following command.
            DISM /Online /Cleanup-Image /RestoreHealth
        
  3. Press the Enter key.
    DISM command for RestoreHealth

Give the DISM tool enough time to scan the system image, and once it is finished, it should automatically replace any damaged or corrupt files. Hence, it may fix the issue at hand, but if it doesn't, then you can now run the SFC scan to repair corrupt data if you couldn't before.

3. Use a CHKDSK Scan to Repair Corrupt Drive Sectors

Another utility, Check Disk, scans and tests every sector of your disk drive hardware and fixes errors if it finds any. Following the SFC scan, CHKDSK holds the greatest potential to repair corrupt files on your preferred drives.

To run a CHKDSK scan in the simplest way, follow these steps:

  1. Open File Explorer and go to This PC.
  2. Right-click on the drive you want to scan and choose Properties from the context menu.
  3. Hit the Check button in the Error checking section of the Tools tab.
    Running a Disk Check in Windows

The error-checking popup will let you know whether you need to run a scan or not. You will have the option to scan the drive in both cases. Hence, run the scan to repair errors it finds.

Even though this method of running the CHKDSK scan can help fix corrupt files in specific drives, if you want the system to run a particular type of scan at a defined location, you can have better control by running the scan from the Command Prompt.

Learn more about the syntax of the command you need to run and the parameters you can use to control the CHKDSK activity on the Microsoft website.

4. How to Use System Restore to Fix Corrupt Windows Files

Microsoft's Windows operating system includes a tool known as System Restore that keeps track of critical system files that can be restored in case of a calamity. Although it's a convenient tool, it can only repair corrupt system files, not personal files.

Follow the below steps to restore your operating system to a previous restore point:

  1. In the Windows search bar, type "Create a restore point" and click on the relevant result in the search results.
  2. Navigate to the System Protection tab in the System Properties window.
  3. Click on System Restore.
  4. After clicking Next, select the restore point you wish to return to, click Next one more time, and then click Finish.
    Using a Restore Point on Windows
  5. Select Yes in the warning prompt, and the process will begin.

At the end of this process, your computer will reboot once, and you should now no longer have the corrupt files and folders issue.

On the other hand, if your personal file is corrupted, you might be able to restore it using the previous version that Windows might have stored. To do this, follow these steps:

  1. Locate the corrupt file or folder.
  2. Simply right-click it and select Restore previous versions.
  3. Select the previous version and click Restore.
    Restoring Previous Version of a Folder in Windows 10

This turnaround won't work if there is no previous version stored. You may need to use third-party tools to fix the corrupt files as a last resort.

Four Built-In Fixes in Windows

Hopefully, the scans and tools mentioned above will help you repair your corrupt files and system. If none of the fixes work, you can try third-party tools to repair the damaged or corrupt files in Windows. Tools like Repair Toolbox, Steller Microsoft Office Repair Toolkit, and Hetman File Repair are all recommended.