“Could not find item” When Deleting File in Windows

I got “Could not find item” message from my Windows when I tried to delete some file from my desktop. If it were some other location, I would probably just leave it there until next time I need to format my hard drive but on desktop it was really poking my eyes :)

Symptoms

  • can’t delete, rename or move file
  • can’t open or edit the file
  • windows reports 0bytes in size

I tried deleting it with windows explorer, total commander, free commander, from command prompt and windows powershell, but nothing worked, always the same message. I figured out that the problem is in last character (space) at the end of file name “file.extension”, because windows API always trims spaces when operating with file names (well… not always i guess, because we would not be having this problem if that was true :D).

Solution

  • go into command prompt (Start>Run>cmd)
  • type “dir filename*” to see if you will be able to delete file and also to make sure that you don’t delete more files by mistake

If list contains only the file you want to delete, then proceed to next steep. IF NOT, then you have to temporarily move all other files to a different location (folder). After you do that repeat the last step to make sure only the file you want to delete is in the list.

  • now type “del filename*”

That’s it, your file is finally deleted.

Leave a Reply

Your email address will not be published.