[SOLVED]Cannot Delete File

Discussion in 'Windows 7 Help and Support' started by hawkeye62, Aug 1, 2014.

  1. hawkeye62

    hawkeye62 Senior Member

    Joined:
    Oct 2, 2011
    Messages:
    204
    Likes Received:
    3
    I have Googled this problem and found some suggestions but they are all several years old. I tried using Command Prompt to delete the file but it fails. There is one suggestion to use a program called Unlock, but when I download it Chrome blocks is as malicious. Another suggestion is a program called File Assassin. I haven't tried that yet.

    Are there any other suggestions?

    Thanks, Jim
     
  2. davidhk129

    davidhk129 Senior Member

    Joined:
    May 19, 2012
    Messages:
    1,337
    Likes Received:
    99
    1. " Chrome blocks is as malicious ".....
    How about switch to IE10 and try the download ?

    2. What kind of files are those ? Personal or system files ?

    3. What error message did you get when you failed to delete ?
     
  3. Fixer1234

    Fixer1234 Senior Member

    Joined:
    Aug 3, 2012
    Messages:
    481
    Likes Received:
    37
    Pauli likes this.
  4. hawkeye62

    hawkeye62 Senior Member

    Joined:
    Oct 2, 2011
    Messages:
    204
    Likes Received:
    3
    Thanks for the replies. The file is just a .txt file. The message is ~ file does not exist.

    Both programs downloaded with no problems. Thanks

    Thanks, Jim
     
    #4 hawkeye62, Aug 1, 2014
    Last edited: Aug 1, 2014
  5. patcooke

    patcooke Microsoft MVP
    Staff Member Premium Supporter Microsoft MVP

    Joined:
    May 16, 2010
    Messages:
    5,456
    Likes Received:
    268
  6. patcooke

    patcooke Microsoft MVP
    Staff Member Premium Supporter Microsoft MVP

    Joined:
    May 16, 2010
    Messages:
    5,456
    Likes Received:
    268
    Just missed this post when I suggested move on boot. The file name is probably stuck in the cache. Try deleting this file:

    C:\Users\User-Name\AppData\Local\IconCache.db
     
  7. hawkeye62

    hawkeye62 Senior Member

    Joined:
    Oct 2, 2011
    Messages:
    204
    Likes Received:
    3
    Thanks, the program downloaded with no problems. I have enough stuff in my arsenal now to give it a try.

    Thanks, Jim
     
  8. Fixer1234

    Fixer1234 Senior Member

    Joined:
    Aug 3, 2012
    Messages:
    481
    Likes Received:
    37
    If you get a message that the file doesn't exist, it's not there any more. The display just needs to be updated. If you quit whatever application you're using to display the files and then restart it, the file should not appear.
     
  9. patcooke

    patcooke Microsoft MVP
    Staff Member Premium Supporter Microsoft MVP

    Joined:
    May 16, 2010
    Messages:
    5,456
    Likes Received:
    268
    That's the objective of clearing the icon cache.
     
  10. hawkeye62

    hawkeye62 Senior Member

    Joined:
    Oct 2, 2011
    Messages:
    204
    Likes Received:
    3
    Well, the "file" stays on the desktop after a reboot. Something more than a display refresh is needed. I can't do anything at the moment because the PC with the problem belongs to my wife and she is deep into a project today.

    Thanks, Jim
     
  11. Fixer1234

    Fixer1234 Senior Member

    Joined:
    Aug 3, 2012
    Messages:
    481
    Likes Received:
    37
    Could it be that what you're seeing on the desktop is a shortcut and the file it points to has been deleted (the target file being what gave you the message that it didn't exist)? Right-click on the desktop icon and look at its properties to determine what it is and its attributes. Have you tried deleting the desktop icon directly (right-click, delete from context menu) since you rebooted or did you just see that it was still there? When you were looking for the file, did you have it display hidden/system files?
     
  12. hawkeye62

    hawkeye62 Senior Member

    Joined:
    Oct 2, 2011
    Messages:
    204
    Likes Received:
    3
    It is a file, not a shortcut. File type (.), 0 bytes, Delete or rename gives message: "Could not find this item. This is no longer located in <path>. Verify the location and try again."

    File Assassin reports, "The file you specified does not exist or is not visible to File Assassin."

    UnLockIT reports, "The file system resource does not exist."

    What now?

    Thanks, Jim
     
  13. Fixer1234

    Fixer1234 Senior Member

    Joined:
    Aug 3, 2012
    Messages:
    481
    Likes Received:
    37
    Ah, yes. The old zero byte file problem. If you do a search on deleting "zero byte" or "0 byte" files, there are many suggestions. Ignore those that involve sacrificing a goat on the full moon.

    Four things to try first.
    1. If you know where the files came from, you may be able to use the program that put them there to get rid of them. For example, if you downloaded the file and used a download manager to do it (or the file downloader built into your browser), the file may appear in that program's file list. There is often a feature to delete the file from there. That will sometimes work.
    2. You may be able to delete it in a command window using it's DOS shortname. Open a command window and navigate to the directory containing the file. Type DIR /X. (If the directory has a huge number of files, use DIR /X /P, which will pause when the display is full.) The DOS shortname will have a maximum of 8 characters, then a dot, then a maximum of 3 characters. The name will not contain any spaces and if it is an abbreviation of a longer name, the last (typically 2) characters of the portion to the left of the dot will be a "sequence number" consisting of a tilde (~) followed by a digit. Use the DOS delete command: DEL <shortname>. If I read your reply above correctly, it looks like the filename does not contain any form of filename extension, so in your example, the file's shortname would be no more than 8 characters.
    3. Try Microsoft's Disk Cleanup utility: http://windows.microsoft.com/en-us/windows/delete-files-using-disk-cleanup#delete-files-using-disk-cleanup=windows-7
    4. Run CHKDSK /F. Open an elevated command window (type CMD in the Start Menu search box. CMD.EXE will appear in a list. Right-click on that and select run as administrator). In the command window, type CHKDSK /F. You will get a message that it can't run while Windows is running and offer to schedule it for when you reboot. Do that. CHKDSK will take a while to run so do the reboot when you won't need the computer for a while (or just wait to follow these instructions in the first place). Don't shut down the computer while CHKDSK is running.
    WARNING: if there are other problems on your hard disk, there is a tiny chance that in the process of fixing that, it could create a new problem. Backup your system before you run CHKDSK just as a precaution.

    Get back to the forum to let us know if this fixes it or we need to try something else (in which case, bring your goat).
     
  14. hawkeye62

    hawkeye62 Senior Member

    Joined:
    Oct 2, 2011
    Messages:
    204
    Likes Received:
    3
    Thanks for your continuing help. I had already tried solution number 2 with no success. I will give the others a try today.

    Thanks, Jim
     
  15. hawkeye62

    hawkeye62 Senior Member

    Joined:
    Oct 2, 2011
    Messages:
    204
    Likes Received:
    3
    Solution 1. won't work because wife copied 3 files to her desktop, then deleted them, leaving the zero byte file.

    Solution 3. did not work, the file is still there.

    I can't try Solution 4. until wife finishes using the PC.

    Jim
     
  16. Fixer1234

    Fixer1234 Senior Member

    Joined:
    Aug 3, 2012
    Messages:
    481
    Likes Received:
    37
    Solution 5: Tell your wife that it's all her fault because she didn't delete the files right. Yeah, that should solve the problem. :rofl:
     
  17. hawkeye62

    hawkeye62 Senior Member

    Joined:
    Oct 2, 2011
    Messages:
    204
    Likes Received:
    3
    Well here is the latest. You and I know it is wife's fault, but I am not going to tell her that.:D

    Anyway here is the solution. Open a command prompt as administrator. Enter the following line.

    del \\?\<path to file>\<file name> enter

    Note: You must enter the entire path and file name. Changing to the directory where the file is located will not work.

    Here is a link to the web site where I found the solution.

    http://superuser.com/questions/332994/how-to-delete-an-invincible-0-byte-file

    Regards, Jim
     
    Fixer1234 likes this.
  18. Fixer1234

    Fixer1234 Senior Member

    Joined:
    Aug 3, 2012
    Messages:
    481
    Likes Received:
    37
    Thanks for getting back with that. Some of these quirky problems and solutions defy imagination.
     
  19. Pauli

    Pauli Extraordinary Member
    Premium Supporter

    Joined:
    Mar 1, 2012
    Messages:
    2,499
    Likes Received:
    211
    Glad you take consideration of your wife - unless it's just a haa-haa. ;) Men do need more than a rolling pin.
     

Share This Page

Loading...