Is there a Tool that Can Erase a File Record from the MFT?
Posted on 2008-10-11
There is a file on my computer's second drive that the Win XP system cannot delete. (Actually, there are several such problematic files on that drive, but suffice it to discuss one of them.) Let me explain the problem in more detail. On the second drive (an NTFS partition named volume F) there is a shortcut file named "TD AmeriTrade.URL." This shortcut does not work and cannot be deleted. The operating system indicates that it is corrupt or unreadable.
The full path to the subject file is "F:\TD AmeriTrade.url"
If I try to delete it through Explorer, the system returns the following error:
"Error Deleting File or Folder - cannot delete TD AmeriTrade:
The file or directory is corrupt and unreadable."
If I try to delete it from a command prompt like so:
F:\>DEL "TD AmeriTrade.url"
I get the following error:
The file or directory is corrupted and unreadable.
I have executed "CHKDSK F: /X" on the subject drive, but that has not fixed the problem (see below) . I have executed CHKDSK with the /F and /R switches, also with no resolution to this problem.
On the Microsoft Support website I found a knowledge base article that describes this problem very well (Q246026 - Cannot Delete or Repair Corrupted File on NTFS Volume):
"SYMPTOMS - When you try to delete a file on an NTFS volume, you may receive the following
'Cannot delete file name: The file or directory is corrupt and
unreadable. The file system structure on disk is corrupt and
unreadable. Please run the Chkdsk utility on the device&'
If you run Chkdsk against the volume, Chkdsk may or may not make repairs,
but afterwards you still cannot delete the corrupted file."
"CAUSE - This behavior can occur if the NTFS volumes' Master File Table (MFT)
is corrupted. The short and long file name pairs that are stored in the directory
index record and the file names that are stored in the associated File Record
Segment (FRS) contain case-sensitive characters that do not match. NTFS supports
case-sensitive (POSIX) file names, but Chkdsk does not check file names in
case-sensitive mode. For example, assume that the directory index record has
a BADFILe.TXT entry but the FRS has a BADFILE.TXT entry for the file name.
NTFS views this as being invalid or corrupted, but Chkdsk compares only the
names and ignores the case. It does not make repairs."
I think that the cause may be something a little different. I think that while an entry for it exists in the MFT, the subject file no longer actually physically exists on the drive. In other words, the MFT has a file pointer for the subject file that points to nothing. That's my hypothesis.
In any case, it seems to me that if one could remove all reference to the subject (absent or corrupt) file in the MFT then the problem would go away.
However, the solution that Microsoft recommends is somewhat drastic:
"RESOLUTION - To resolve this issue, back up the volume that contains the
corrupted file(s) and exclude the corrupted file(s) from the backup job.
Reformat the volume, and then restore from the backup. "
Could you please shed some light on this problem and how to resolve it without having to reformat the drive?
C:\>CHKDSK F: /X
The type of the file system is NTFS.
Volume dismounted. All opened handles to this volume are now invalid.
Volume label is Data.
CHKDSK is verifying files (stage 1 of 3)...
File verification completed.
CHKDSK is verifying indexes (stage 2 of 3)...
Index verification completed.
CHKDSK is verifying security descriptors (stage 3 of 3)...
Security descriptor verification completed.
CHKDSK is verifying Usn Journal...
Usn Journal verification completed.
117186110 KB total disk space.
88352220 KB in 69205 files.
23212 KB in 5598 indexes.
0 KB in bad sectors.
281398 KB in use by the system.
65536 KB occupied by the log file.
28529280 KB available on disk.
4096 bytes in each allocation unit.
29296527 total allocation units on disk.
7132320 allocation units available on disk.