Fix Corrupted Files & Folders on Windows
In this article
Yes, you can often fix the "file or directory is corrupted and unreadable" error on Windows. This error usually indicates that the file system has encountered problems, making a file inaccessible. The steps below outline several methods to diagnose and potentially repair the issue, from basic checks to more advanced tools. Before proceeding, it's crucial to back up any important data if possible, as some solutions might involve data loss.
What You'll Need
- A Windows PC (Windows 10, 11, or earlier)
- Administrator privileges
- A bootable USB drive (optional, for advanced troubleshooting)
Step-by-Step
- Restart Your Computer: This is the simplest and often most effective first step. A restart can clear temporary glitches that might be causing the error.
- Run CHKDSK (Check Disk): CHKDSK is a built-in Windows utility that scans your hard drive for errors and attempts to fix them.
- Open Command Prompt as an administrator: Search for "cmd" in the Windows search bar, right-click "Command Prompt," and select "Run as administrator."
- Type the command:
chkdsk /f /r X:(replace "X:" with the drive letter of the affected drive). The/fparameter fixes errors, and the/rparameter locates bad sectors and recovers readable information. - If the drive is in use (usually the C: drive), you'll be prompted to schedule the check for the next restart. Type "Y" and press Enter, then restart your computer.
- Allow CHKDSK to complete the scan. This can take a significant amount of time, depending on the size of the drive and the number of errors found.
- Use System File Checker (SFC): SFC scans and repairs corrupted Windows system files.
- Open Command Prompt as an administrator (as described above).
- Type the command:
sfc /scannow - Wait for the scan to complete. SFC will attempt to repair any corrupted system files.
- Run DISM (Deployment Image Servicing and Management): DISM can repair the Windows image, which SFC relies on.
- Open Command Prompt as an administrator.
- Type the following command:
DISM /Online /Cleanup-Image /RestoreHealth - This process can take a while, depending on your internet connection speed.
- Try Opening the File in a Different Program: The error might be specific to the program you're currently using. Try opening the file with an alternative application that supports the same file type.
- Restore from a Previous Version (Shadow Copy): If System Restore is enabled, you might be able to restore a previous version of the file or folder.
- Right-click the affected file or folder.
- Select "Properties."
- Go to the "Previous Versions" tab.
- If previous versions are available, select one and click "Restore."
- Use Data Recovery Software: If the above steps don't work, data recovery software can attempt to recover data from the corrupted file. There are many options available, both free and paid (such as Recuva, EaseUS Data Recovery Wizard, or Disk Drill). Follow the software's instructions to scan the drive and recover the file.
- Check Disk for Bad Sectors (Advanced): While CHKDSK attempts to fix bad sectors, a more thorough check can be performed using disk diagnostic tools provided by your hard drive manufacturer. These tools can often provide more detailed information about the health of your drive.
- Boot from a Recovery Drive or Installation Media: If the drive is severely corrupted, you might need to boot your computer from a recovery drive or Windows installation media. From there, you can run CHKDSK or other diagnostic tools.
Common Mistakes
- Not running CHKDSK as administrator: CHKDSK requires administrator privileges to perform repairs.
- Interrupting CHKDSK: Allow CHKDSK to complete its scan without interruption. Interrupting the process can cause further damage.
- Ignoring error messages: Pay attention to any error messages displayed during the repair process. These messages can provide clues about the underlying problem.
- Overwriting the file: When using data recovery software, be careful not to save the recovered file to the same drive that it was recovered from. This can overwrite other potentially recoverable data.
- Assuming a single solution works for all corruption: File corruption can have many causes, and what works for one situation might not work for another.
Tips
- Regular Backups: The best way to protect yourself from data loss due to file corruption is to regularly back up your important data.
- Keep Your System Updated: Regularly update your operating system and drivers to ensure that you have the latest bug fixes and security patches.
- Scan for Malware: Malware can sometimes cause file corruption. Run a full scan with a reputable antivirus program.
- Monitor Drive Health: Use SMART monitoring tools to keep an eye on the health of your hard drive. These tools can alert you to potential problems before they lead to data loss.
- Avoid Sudden Power Outages: Sudden power outages can corrupt files that are being written to the drive. Use a UPS (Uninterruptible Power Supply) to protect your computer from power outages.
Troubleshooting
- CHKDSK finds errors but can't fix them: This might indicate a more serious hardware problem with the hard drive. Consider replacing the drive.
- Data recovery software doesn't find the file: The file might be overwritten or too severely damaged to be recovered.
- The error persists after running CHKDSK and SFC: The file system might be severely damaged, or there might be a hardware problem with the drive. Try booting from a recovery drive and running CHKDSK again.
- The drive is making unusual noises: This could indicate a mechanical failure. Back up your data immediately and replace the drive.