ThisCalculator

Everyday

File or Directory Is Corrupted? Fix It Now

Updated · Standard formula, shown below

File or Directory Is Corrupted? Fix It Now

If you see “File or directory is corrupted and unreadable” (error 0x80070570) on Windows, it means the file system cannot read the data at that location, often due to bad sectors, a failing drive, or an interrupted write. You can usually fix it by running a disk check, using a different recovery tool, or copying the file with a specialized utility. This article explains what causes the error, how to fix it, and how to prevent it.

What Does “File or Directory Is Corrupted” Mean?

The error appears when Windows tries to access a file or folder but the file system metadata (like the Master File Table on NTFS) or the data itself is damaged. It is not a virus warning; it is a storage integrity problem. The full message usually reads: “File or directory is corrupted and unreadable. The file or directory \\?\C:\… is corrupted and unreadable.” It can happen on any storage device: internal hard drives, SSDs, USB flash drives, SD cards, or external drives.

Common Causes

  • Bad sectors on a hard drive or flash memory cells on an SSD that can no longer hold data reliably.
  • Improper ejection of a USB drive or external drive while writing, which can corrupt the file table.
  • Power loss during a write operation (e.g., a laptop battery dies while saving a large file).
  • File system errors from a previous crash, a faulty update, or a malware infection that modified system files.
  • Physical damage to the drive, such as a dropped laptop or a damaged connector.

How to Fix It: Step-by-Step

  1. Run CHKDSK (Check Disk) to find and repair file system errors. Open Command Prompt as administrator and type chkdsk X: /f /r (replace X with the drive letter). The /f flag fixes errors, /r locates bad sectors and recovers readable data. You may need to restart the computer if it is the system drive.
  2. Try a different USB port or computer if the drive is external. Sometimes the issue is a loose connection or a failing USB controller.
  3. Use a file recovery tool like Recuva, TestDisk, or PhotoRec to copy the data to another drive. These tools read raw data and can often recover files that Windows cannot access normally.
  4. Copy the file with a different method: use robocopy in Command Prompt with the /B flag (backup mode) to copy the file, or use a live Linux USB to access the drive and copy the file to a healthy location.
  5. Format the drive as a last resort if the data is not valuable or already backed up. Formatting will erase everything but will give you a clean file system.

How to Read the Error Code

The error often includes a hexadecimal code like 0x80070570. That code is a Windows system error that translates to “ERROR_FILE_CORRUPT”. It means the file or directory is corrupted and unreadable. If you see 0x80070017 (ERROR_CRC), it indicates a cyclic redundancy check failure, which usually means physical damage or bad sectors. Seeing the code helps you decide: CRC errors are more serious and point to hardware failure, while a generic corruption error might be fixable with CHKDSK.

How to Prevent It

  • Always safely eject USB drives and external hard drives before unplugging them.
  • Use a UPS (uninterruptible power supply) for desktop computers to avoid power cuts during writes.
  • Keep your drive healthy: run chkdsk periodically and monitor SMART status with tools like CrystalDiskInfo (for Windows) or smartctl (Linux).
  • Back up important files regularly to a separate drive or cloud service. The 3-2-1 rule is a good guideline: three copies, two different media, one offsite.

When to Replace the Drive

If you see the error repeatedly, especially on the same drive, it is a strong sign the drive is failing. Listen for clicking noises (hard drives) or check SMART attributes. If the drive is under warranty, back up what you can and replace it. Continuing to use a failing drive risks losing all data. For SSDs, the error can also indicate the drive has exhausted its write endurance or has a firmware bug; check the manufacturer’s tools for diagnostics.

Frequently Asked Questions

Can I recover files from a corrupted drive?

Yes, often. If the corruption is logical (file system errors), CHKDSK might repair it. If it is physical, use recovery software like Recuva or TestDisk. The sooner you stop using the drive, the better the chances of recovery, because continued writes can overwrite the damaged areas.

Is it safe to ignore the error if it only happens once?

It might be a one-off from an improper shutdown. Run CHKDSK to check for errors. If the error does not reappear and you have backups, you can continue using the drive, but keep an eye on it. If it happens again, back up immediately.

What is the difference between “corrupted” and “unreadable”?

“Corrupted” means the data is damaged or inconsistent with the file system. “Unreadable” means the drive or file system cannot access the data, which could be due to hardware failure or a bad connection. The error message combines both because the corruption makes the file unreadable.

Does CHKDSK delete my files?

No, CHKDSK does not delete files. It repairs file system metadata and can move data from bad sectors to good ones. However, if a file is severely damaged, CHKDSK might mark it as “recovered” or leave it as a .chk file, which you can try to recover manually. Always back up before running CHKDSK if possible.

Can I fix the error on a Mac or Linux?

Yes, you can use the fsck command on Linux or macOS (but be careful with APFS). For a Windows-formatted drive, you can run ntfsfix on Linux, but it is less thorough than Windows CHKDSK. The best is to use a Windows machine to run CHKDSK.

Is this error a sign of a virus?

Not usually. Corrupted files are more likely from hardware or software issues. However, some malware can corrupt files, so if you suspect a virus, run a full antivirus scan. But the error itself is not a virus.

Related

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.