How do I delete "phantom files" in Windows 7?

Here’s the problem: in my download folder for Firefox, there are some files which are remnants of aborted downloads. These files are named like the original files that were tried to download, but without extension, with a filesize of 0 Bytes. When I try to delete them in Windows Explorer, I get the message (paraphrased from my German copy of Windows):

“This element couldn’t be found … The element is no longer located in H:\Downloads. Check the element’s location and try again.”

So it seems like the folder/file allocation is somehow corrupted. I tried to empty the folder and delete it, but no dice: it can’t be deleted because it still contains those corrupted files. I also tried to delete them with “del” from a command line, but that doesn’t work either.

It’s no big deal, but I like to keep my folders tidy and want to get rid of these files. Google didn’t help; I got a lot of hits for explanations to delete files that are still in use by some programs, but that’s not the problem in my case. So what can I do?

Hmm, have you tried booting into safe mode and deleting it there? Can you take a screenshot of the error?

Can’t remember if I tried that, but I’ll try it now. A screenshot wouldn’t be of much use, as the error box only contains the error message I quoted in the OP, but in German.

Check the attributes. I’ll bet one or more flags are set to prevent deletion.

Check for hidden files. If one is read only, yet you can’t see it, that would explain what you are experiencing.

You should be able to delete the file inside a command prompt. Click on your start button and choose cmd.exe (I suppose it might have a different name in the German version). Then navigate to the proper folder as in DOS days using cd and erase the files using del.

Won’t work if they are R/O and/or hidden. You may have to change the attributes first (ATTRIB).

Use UnLock IT Free - Unlock a File or Folder Locked by the System

Tried it in safe mode: no difference, I get the same error message. The files are neither R/O nor hidden. As I said in the OP, I tried to delete from a command prompt, didn’t work either.

I suspect that the error lies somehow with what used to be called file allocation table, I don’t know the equivalent on a NTFS drive. If it makes a difference, those files are located on a NTFS partition of a physical hard drive.

What if you did a “rd /s downloads” to delete that entire folder?

Tried it, didn’t work. MoveOnBoot says:

[Quote=MoveOnBoot]
Warning Schedule File for Deletion The application can’t access the following file - it may be blocked or doesn’t exist on the file system, so its deletion may not succeed on the next Windows boot.
[/Quote]

So as I guessed, the issue is somehow deeper in the system than just a blocked file. There seems to be a mismatch between what Windows Explorer displays and what exists for the Windows file system.

Already tried, didn’t work. The error message was “Folder not empty” or something to that extent.

Have you done a disk check?

Sounds like you might have some corruption in the file table. I’d try setting the system up to run chkdisk the next time you restart.

Instructions here.

Can you do a dir /x Downloads – which will list the shortnames of files in that dir, like corupp~1.zip – and then try deleting the shortname version in the command prompt?

If dir /x doesn’t work, it should just be the first 6 letters of the name and then a ~1.ext(ension)

To my shame, I seem to have that misremembered. So I tried that again, and alas, that did the trick. Thanks, Reply, and also thanks to all the others who wanted to help.

Huzzah!*

*I have no idea what that word actually means, but it sounds cool.

Master File Table.

Chkdsk works for NTFS, but I haven’t tried it on Win 7. If that is your problem, chkdsk /f is a fix.

I wrote the above 3 hours ago, then was called away from my computer before posting. I see the advice is no longer needed, but I’ll post it anyway.

You probably just tried plain “rd Downloads.” Without the /s, directories won’t be removed unless they are empty.

And, yeah, run a chkdsk /f to check for and repair errors, just in case it’s not just in your Downloads folder.

Probably this would have resolved the issue, too. I frankly didn’t think of chkdsk, because since the days of Win 9.x and XP I think I’ve never used it again.