Long-time subscriber Lanny Totman wrote to ask for help with a hard drive problem he was having:
I have a corrupt file on my system and I cannot get rid of it.
I tired to delete it, ran chkdsk, tried unlocker and nothing works.
Any idea on how to remove it?
I wrote back to Lanny to get some more information and make a suggestion.
What’s the error message when you try to remove it?
What operating system?
Have you tried booting into Safe Mode and deleting it from there?
Lanny provided a bunch more info to help diagnose the problem:
Sorry about that, should of included the information.
Message I received when trying to delete the file or direcrtory:
"Cannot delete [file name deleted — Terry]: The file or directory is corrupted and unreadable"
The operating system is XP Pro, Service pack 3 and all latest updates from Micorsoft.
I have tried to delete through safe mode and again no luck, and also using cmd prompt and dos command again no luck.
Lanny should be able to solve this by getting a little tricky…
I suggested that he create new directory, move everything else from that directory into it, then delete original directory. In other words, delete the directory to delete the undeletable file within it.
I detailed and explained the steps as follows:
- Create a new directory at the level of the directory you’re trying to delete – or just somewhere else on that drive. For example, if the directory that has the problem file is "C:\Documents and Settings\lanny\My Documents\movies", then create a new directory "C:\Documents and Settings\lanny\My Documents\movies-keep" .
- For all the other files in the directory that has your problem file, move them into the new “movies-keep” directory. Be sure to use the right-click and drag method, then select “Move” from the resulting popup context menu. Otherwise, if you drag and drop with the left menu, and do it to another location on the same hard drive partition (same drive in Windows), Windows will only create shortcuts in the destination folder!
- When that move is complete, check the "movies" directory to make sure that the only file left in it is the file that’s causing the problem.
- Now, we’re going to take the tricky step. Delete the "movies" directory (the directory that has the problem file and only the problem file.
If the problem is the file and not the directory, by deleting the directory, he’ll get rid of the file at the same time.
If the directory is the problem, he might need to use a directory repair utility.