How to Fix Corrupted Files in Windows 10 and 11

Options
Robert_Stark
edited September 2023 in PC Tech

Corrupted files can lock you out of your vital data. You double-click on a file, expecting it to open, but instead, an error message pops up: "The file is corrupt and cannot be opened." Panic sets in as you realize your critical work document is lost.

But fear not, Windows 10 & 11 have tools to fix corrupted files and get you back on track. We'll guide you through what data corruption is and the simple steps to diagnose and repair files. 

​​What is data corruption? 

Data corruption happens when errors in a file system make information unreadable or mistakenly altered. These glitches can make files unusable or cause unexpected app behavior. When data becomes corrupted, it can result in partial or total loss of vital information.

Causes of corrupted files 

Corrupted files are disruptive, but understanding the root causes can help prevent them. Here are the five main reasons Windows files might get corrupted:

1) Malware and virus attacks 

Infections from malware and viruses can corrupt your data by overwriting files with inoperative or garbage code, leading to unexpected errors and loss of information. Run antivirus software to test whether a virus is causing the issue. 

2) Unsafe removal of storage devices 

Unplugging storage devices like USBs and external hard drives without safely removing them first can cause data corruption. Always follow proper procedures to avoid losing data.

3) Bad disk sectors 

Bad sectors on a hard disk can make areas unreadable or unwritable, corrupting files and folders. On HDDs, this might stem from mechanical issues, shocks, or electrical surges. On SSDs, the culprits might be flash memory degradation, over-provisioning, or misalignment.

4) Operating system bugs and crashes 

Improperly allocated files in memory can lead to corrupted file errors. When multiple files are assigned to the same memory cluster, the system gets confused, making files unreadable. This type of corruption often results from programming errors or sudden system failures.

5) Improper file handling 

Mishandling files, such as improperly saving or incorrectly stopping a relocation process, can create inconsistencies within the file. This leads to corruption, rendering the file unusable or causing errors.

Understanding these causes is the first step in preventing corrupted files. By being mindful of how you handle files and taking proper precautions with your hardware, you can minimize the risk and keep your data safe and sound.

How to fix corrupted files

1) Use file history to restore previous versions of the file 

File History is a Windows 10 and 11 feature that saves copies of your files, allowing you to recover them if lost or damaged. It automatically creates copies whenever a restore point or a File History copy is made.

Enable previous versions in Windows 10

To turn on Previous Versions from File History on Windows 10, follow these steps:

  1. Connect an external storage drive.
  2. Open Settings
  3. Go to Update & Security > Backup.
  4. Click Add a drive.
  5. Select the drive connected to your computer.

Enable previous versions in Windows 11

To enable Previous Versions from File History on Windows 11, follow these steps:

  1. Connect an external storage drive.
  2. Click Start > Control Panel
  3. Click System and Security > File History.
  4. Windows will automatically detect the external storage drive connected to your computer.
  5. Click Turn on - it will start creating a backup on your external device.

How to restore files with previous versions

  1. Right Click on the file or folder you want to restore.
  2. Click the Restore Previous Versions menu shortcut.
  3. Select the previous version from the list of files.
  4. Click the Restore button.

Even with the best efforts, there is always the risk of data corruption due to a mishap, and creating duplicates is no easy task. For this reason, creating a regular backup of your data is recommended. In addition, because it doesn't require as much manual effort as creating duplicates, it won't take up much of your time.

2) Run Chkdsk command in Windows

Short for "check disk," Chkdsk is a built-in Windows utility that checks for and repairs disk errors. It's a valuable tool for diagnosing and fixing issues related to bad sectors, file system errors, and more.

How to run Chkdsk in Windows 10 and 11

  1. Type cmd in the Windows search bar.
  2. Right-click on Command Prompt, then choose Run as administrator.
  3. In the separate Command Prompt window, type chkdsk /f plus the drive letter you want to check (e.g., chkdsk /f C:).
  4. Press Enter. If the drive is in use, you may be prompted to schedule the check for the next system restart.
  5. Follow the on-screen instructions to complete the process.

Chkdsk command options:

  1. chkdsk /f: Checks and fixes file errors on the disk. Requires the disk to be locked.
  2. chkdsk /r: Locates bad sectors and recovers any readable information from them. Includes the functionality of /f, with additional analysis of physical disk errors. Requires the disk to be locked.
  3. chkdsk /scan: Runs an online scan on an NTFS volume but does not try to repair it. The disk doesn't require locking.

3) Run SFC Scan to repair corrupt system files in Windows 10 and 11

The System File Checker (SFC) is a handy command-line utility that can help you when you encounter corrupted system files. SFC will automatically find and repair corrupt Windows system files.

How to run an SFC Scan

You must run Command Prompt as an administrator:

  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.
  4. The utility will begin processing the system files. Depending on the data size, this may take some time, so feel free to minimize the Command Prompt app and continue working.

Analyzing SFC scan results

Once the SFC scan completes, you'll see one of four possible outcomes:

  • No Integrity Violations Found: Your system files are clean, and no corrupt files were found. If the file is still inoperable, another issue may exist.
  • Could Not Perform the Requested Operation: The SFC scan couldn't complete. Try running it in Safe mode.
  • Corrupt Files Repaired Successfully: The corrupt files have been fixed automatically, so no further action is needed.
  • Found Corrupt Files but Couldn't Fix Some: You must manually locate and repair the files.

4) Use the DISM tool

Sometimes, an SFC scan might not identify the problem, or you may be unable to run it. In these cases, you can use the Deployment Image Service and Management Tool (DISM) to repair the system image.

How to repair the system image using DISM

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

  1. Enter cmd in the Windows search bar.
  2. Right-click on Command Prompt and select Run as administrator.
  3. Enter this command: DISM /Online /Cleanup-Image /RestoreHealth
  4. DISM /Online /Cleanup-Image /RestoreHealth
  5. Press the Enter key.
  6. Allow the DISM tool enough time to scan the system image. It may take a while, depending on your system's configuration.

After the scan, the DISM tool will automatically replace corrupt or damaged files. This action may fix the issue at hand. If not, you can run an SFC scan to solve any further corrupted data.

5) Data recovery software to the rescue

When built-in Windows utilities fall short, third-party tools can come to the rescue for more complex data recovery needs. Here are two reliable options:

EaseUS Data Recovery

EaseUS Data Recovery specializes in restoring various file types, including documents, pictures, videos, and emails, with a free recovery limit of up to 2GB. Key features include:

  • Versatile Recovery Options: Works with Recycle Bin, HDD, SSD, USB, SD card, etc.
  • Recovery Scenarios: Handles data loss due to formatting, deletion, OS crashes, virus infections, etc.
  • Specialized Functions: Offers targeted recovery for lost partitions, formatted files, damaged HDDs, and crashed OS.
  • File Repair: Repairs corrupted photos, videos, and documents.

Stellar Data Recovery Free Edition

Stellar Data Recovery is designed to retrieve lost or deleted files for personal and professional use. Key features include:

  • File Type Recovery: Recovers photos, videos, and documents like PPT, PDF, and DOCX.
  • Storage Media Compatibility: Retrieves data from the recycle bin, HDDs, SSDs, and external storage devices.
  • Complex Issue Handling: Recovers data from formatted, encrypted, or corrupted drives.
  • Free Recovery Limit: Allows recovery of up to 1 GB of files at no cost.

These third-party tools provide comprehensive solutions for various data recovery needs, from simple file deletions to more intricate challenges like partition loss and encryption. Whether dealing with accidental deletions or more severe data corruption, these tools offer valuable support.

Note on Safety: Download from reputable sources using third-party tools to avoid malware and other security risks. Read user reviews and consult technology websites to find a tool that suits your needs.

Corrupted files are unfortunate in the digital world, but they don't have to spell disaster. From understanding the causes to employing various recovery methods, this guide arms you with the tools to tackle data loss head-on. Prevention is vital, so take the necessary precautions and consider these solutions for those unexpected moments.

Robert is a Taiwan-based writer and digital marketer at iamrobert design. He has a passion for helping people simplify their lives through tech.

Socials

Stay Up to Date


Get the latest news by subscribing to Acer Corner in Google News.