Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a file whose size is 0 bytes. When I try to remove it an error message appears, saying "Could not find file".

Here is the list of things I've tried to delete the file:

  • Rebooted
  • Reset folder options
  • Cleaned the registry with CCleaner
  • Using the del command
  • Replacing it with a different file

The dir command gives this information about the file:

25.06.2011 21:06 0 STALKER

File properties:

asdf

How can I remove it?

share|improve this question
4  
When you tried Del from the command prompt, did you try del *. to delete all files in the folder with no extension? –  Ƭᴇcʜιᴇ007 Sep 7 '11 at 18:15
3  
@techio007 - since that worked, you should submit it as an Answer and then yoz1k can mark it as correct. This will make it easier for others with the same problem to find help. Thanks. –  jcrawfordor Sep 7 '11 at 19:23
    
possible duplicate of Can't delete pdf file! –  Moab Sep 8 '11 at 3:48
    
Wait, so del stalker didn’t work, but del *. did? Are you sure the filename didn’t have a trailing space or something? If you hadn’t deleted it, you would have wanted to bring up its Properties Dialog again, then press End in the filename field to see if there are any extra whitespace characters at the end. ;-) –  Synetech Sep 8 '11 at 3:50
    
@Moab, it’s not the same. That question was about a locked file, this one is not locked, it probably has an invalid filename. That’s why the two questions have completely different answers (and if it were locked like in the other question, the command in the solution wouldn’t have worked). –  Synetech Sep 8 '11 at 3:52

3 Answers 3

up vote 7 down vote accepted

Try del *. from the command prompt while in the folder the file's in. It will delete all the files in that folder that have no extension.

share|improve this answer
1  
Only there isn't any reason why Windows wouldn't be able to display its attributes (time, ACL), just because it has no extension. In this case it's most likely that the file had a trailing dot, which many Win32 programs will choke on. –  0xC0000022L Feb 19 '13 at 11:33

Actually the del *. doesn't always work. The best answer I have found so far is:

  1. open an elevated command prompt
  2. Enter del "\\\\?\C:\Users\userX\0bytefile"

... and voila, the file is deleted. No need to restart or anything else, just need to put \\\\?\ before the directory when using the del command. Also use the tab button to make sure the name is correct; sometimes a space is added at the end that can be easily missed.

An explanation can be found here: File apparently doesn't exist when attempting to delete it

share|improve this answer

You can also try to setup mutiboot with Linux. You can mount your Windows disk and delete it, (as long as it's not encrypted).

I'd recommend Linux Mint. Just download the .iso file and burn it to a disk or create a bootable flash drive.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.