When I try to delete file in my PC it gives the error "Item not found"

When I try to delete file in my PC it gives the error

Could not find this item This is no longer located in C:\Users\1600\Downloads. Verify the item's located and try again

File shows 0KB size.


This is not answered. Ironically, it is answered in the following thread which is marked as a duplicate of this question:

Cannot delete a file: System cannot find the file specified

I had this problem because I had generated folder names with a trailing space character, which Windows 7 does not handle gracefully. After trying all sorts of command line wizardry and obscure workarounds the thing that allowed me to delete the folder with trailing space was 7-zip, of all things. I clicked "Delete files after compression" and 7-zip was able to delete a folder that neither explorer.exe nor cmd.exe could.


Perhaps it has a control char or other invisible character embedded in the name. Try going to a command prompt and do a dir of the filename. If it says it could not find it, use wildcards e.g. foo around part of the filename until it shows a directory listing for the one file. Then use the same wildcards in the del command.