DEV Community

Cover image for How to fix the error «The file or directory is corrupted and unreadable»?
Michael Mirosnichenko
Michael Mirosnichenko

Posted on

How to fix the error «The file or directory is corrupted and unreadable»?

Unexpected errors in accessing files or directories when trying to open them, or difficulties in reading files which are corrupted may result in losing all the data. Read this article to find out how to fix errors and recover lost data from damaged or unreadable sectors.

Introduction

All kinds of information are stored in memory devices and it is important to make sure that users can always access it when addressing the memory device. However, in spite of modern storage devices being very reliable, sometimes there are situations when you can’t do it. Quite often, you may see a notification that a file or directory cannot be accessed because it is damaged or there is a read error. Vitally important information can be damaged or even lost forever which is a serious problem for an ordinary user – frankly speaking, most of us still tend to neglect regular backups. Later in this article, we will focus on the signs and causes of this problem with accessing or reading data from various devices, and offer simple and effective methods to solve the issue.

Typical signs of this error

YouTube:

At least once, most users have faced a system notification for an error saying that a file or directory can’t be read because they are damaged, while trying to connect a USB flash drive, an SD card or another storage device working in Windows 10/8/7/XP/Vista or an earlier version of this operating system.

This is a general way to notify users of a simple error that usually emerges because of removable drive issues when, for certain reasons, Windows can’t process the information stored on such device and display it to the user, or when there is no access to the external memory device.

The direct consequence of such error is that you can’t use this device, the information stored on it, and there is a risk of losing it for good.

There are several causes that may trigger this unpleasant error, and we are going to focus on these below.

The main causes behind the “corrupted and unreadable” error

Main causes of the error indicating inaccessibility of a memory device or problems with reading data from a connected memory device are related to the data itself of possible damage to the storage device, both in terms of hardware of software components.

Errors related to connection issues are less common. For example, a USB port of a computer (which is used to connect the external hard drive) may not work properly, provide only poor contact or be damaged physically. To fix this kind of error just use another, properly working USB port and the access will be restored.

Below, we will analyze the most widespread cases.

YouTube:

Damaged file tables (MFT or FAT)

Talking of Windows operating system which is the most widespread platform in the world providing multiple options to organize full-fledged operation of personal computers and management of computing services, the most widely used file systems are NTFS and FAT.

The main file system MFT (Master File Table) is the cornerstone for NTFS file system which is currently used in the majority of home and office computers and is in charge of most important functions in file storage devices.

It is a kind of a database in the form of a table made up of hidden system files that contain various information vital for full-fledged operation of the OS. For example, tables containing data on the clusters occupied by files and on file attributes, the list of operations involving files, root directory data, information on data segments and mirror files etc.

Also, MFT stores all information on saved folders and files such as size, time, date and permissions. When users remove files from an NTFS partition, entries for such files in the MFT table are marked as free and can be used for writing new data.

The operating system analyzes the MFT data and displays the corresponding files when you access the device. Therefore, if the MFT table is damaged, the operating system won’t be able to access data from NTFS partitions.

The FAT file system is used in flash drives which are mostly known in the form of USB drives and SD cards. At the moment, the widely used file systems are FAT 32, FAT 16 and FAT12. The FAT file system stores and manages data with the help of the special table (File Allocation Table) in the initial part of the system. Put simply, its main function is to show the operating system the location of the files stored on the device. Files are stored in clusters, and every cluster contains an indicator to the next connected cluster so the file can read all file data. Therefore, an FAT error will result in damage to the partition and the impossibility to read data.

An external hard drive or USB drive infected by a virus

The Internet as a global information network influences greatly the spread and interaction of all kinds of computing devices. People use the Internet daily for all kinds of tasks: view websites for work, study or entertainment purposes, download or install various software, exchange business or personal files, archives, documents, images, receive and send emails, communicate via different messengers and similar apps etc. Thus, it is quite possible that a computing device may be infected by a virus if users visit suspicious websites that may contain malware, or install unknown apps from doubtful sources. Most users are relatively well-informed on the malicious effects of viruses on computing devices and the data they store. Viruses can secretly remove, modify or copy important files, affect or disrupt working processes of an operating system, block execution of programs including antivirus applications, gain control of user devices, erase partitions and volumes, and cause irreversible changes at the software and hardware levels.

In addition, viruses can create their own copies and infect other disks and rives connected to the virus-ridden computer. Therefore, having an antivirus installed on your computer doesn’t mean that your USB drives are free from viruses, because such drives could be also used with other computers lacking antivirus protection or already infected by some malware.

You can learn more about advanced methods for elimination and detection of various malware, and protection strategies for personal computers by watching a video tutorial in our channel: «100% guaranteed removal of any virus: Trojan, rootkit, ransomware, spyware».

As soon as a virus damages the file system of a disk, the partition becomes unreadable and all files on it will be inaccessible for use. To make things even worse, an antivirus cannot extract data from the disk even after the virus is cleaned. That is why it is important to upgrade antivirus software timely and keep its virus signature banks up to date, and scan the USB drives regularly especially when you deal with drives used with somebody else’s devices. What is more, try to avoid using suspicious or unreliable flash drives to reduce the chance of infecting your PC or losing data.

Top comments (0)