2

My Windows 7 is doing this recently. From time to time some files of different origins can't be deleted. Sometimes it's a PDF I've just downloaded, sometimes it's a source code file I'm editing on Eclipse.

I tried Unlocker and it says nothing is locking them.

Also, explorer doesn't work well with them. The simple act of right clicking the file makes explorer freeze. Opening the file with notepad++ freezes the notepad. If I use cmd.exe I can DIR the file, but if I try DIR /Q, or DEL /F, cmd doesn't return. If I press SHIFT + DEL on the file, the delete dialog shows and the progress bar moves back and forward forever and the statistics of deletion are always 0.

If I logout and login again, the file is still "locked". The only thing that solves is rebooting the system.

Any ideas on what is going on with these files?

UPDATE: I'm having the same issue described here: Unresponsive file causes Windows Explorer to stop responding

15
  • Can you think of anything common that these "locked" files share? (only downloads, special characters in filename, certain file size, certain file type, etc)
    – Steven
    Commented Dec 16, 2015 at 20:01
  • 2
    Check for file-system/disk corruption (chkdsk). Commented Dec 16, 2015 at 20:07
  • 1
    often invisible characters in file names can cause this kind of bizzare behavior. have you tried renaming it to somthing innocous, like thing1.pdf? Commented Dec 16, 2015 at 20:08
  • Do you have any software installed that has a thumbnail or context menu handler that may be crashing when file info is queried? Any e.g. video players, PDF viewers, anything like that that is taking some responsibility for generating file thumbnails / metadata values in explorer?
    – Jason C
    Commented Dec 16, 2015 at 20:08
  • Also grab Process Explorer, when you find a locked file like this, open Process Explorer, press Ctrl+F and type in part of the filename then search to see if you can find something that has it open (which may just be explorer.exe though if e.g. it's a thumbnail handler or something). (But run chkdsk first just to rule that out.)
    – Jason C
    Commented Dec 16, 2015 at 20:10

2 Answers 2

1

It ended up being Windows Search service locking files and then crashing itself.

Eclipse writes lots of files during build and checkout of project branches. My workspace is located in my home folder which is one of the folders indexed by Windows Search. I believed this contributed to the service crash.

I just added an exception to the service not to index the workspace folder. I've been using Eclipse for days and no more files were locked.

Thank you guys.

1

*** This has already been answered...but here's my own experience & solution.

Win7...Explorer crashes on discovering folders containing buggy audio files, eg wav file, mp4 file, mp3 file or similar badly encoded files.

No other program could delete these files (including Explorer) EXCEPT a small FREE program called File Assassin by Malwarebytes.

https://www.malwarebytes.com/fileassassin/

Once open just use the "Use delete on Windows reboot functions" setting, then click "Execute" & restart your computer as normal.

Check that the problem file is gone when your PC starts up.

*** Don't dick around with CMD prompts & registry hacks...this is the SAFEST & SIMPLEST METHOD!!!

Good luck!

1
  • Thank you so much! This software was the only one that could delete a broken opus file in my Downloads folder. (Using Win 10, still not fixed)
    – Berny23
    Commented Sep 25, 2021 at 12:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .