Why do deleted files still show up in Explorer until I refresh the folder?

Solution 1:

I have seen this issue before and it always seems to be related to libraries and windows indexing.

Here are some basics:

Libraries are basically simple shortcuts that can open multiple locations with a single click. If you move a folder or directory that is connected to a library the library shortcut will still show the contents of that folder. I believe there may be some unique handling when you use a library shortcut to access these folders and so windows indexing system may sometimes fail to update properly.

Indexing is a system used so that when you search for a file instead of windows physically searching all or portions of a hard-drive, it can simply search a list of files and locations. This list, I believe, is usually stored in a single location. This can speed up searches and displaying file lists. If for some reason, the indexing system doesn't remove a file from it's index after it's been deleted, it may continue to show up in folders.

The last time I had this issue I did an index rebuild and the offending files went away. I don't know what actually causes this, nor have I discovered how to duplicate the issue. I suspect it MIGHT be possible that after deleting a file, the computer is rebooted or a program clears out the memory of that action being done so the indexing system doesn't update properly and because the indexing system has essentially forgotten that you deleted a file and doesn't detect a successful file deletion, the file "ghost" remains. If this is correct then Microsoft would have to adjust the indexing system to check it's index if a file delete is attempted and fails. Till then, I'm guessing that rebuilding the index might be the only way to resolve the issue.

Win7:

  1. Click on your start button and search for index. You should find Indexing Options.
  2. Click on Indexing Options.
  3. Click The Advanced Button (Admin/elevated privileges needed)
  4. Click Rebuild.

{Indexing options can also be found in Control Panel When Large or Small icons instead of Category is selected.}

In most cases if you are using SSD drives indexing may not increase the speed at all. If this is a constant issue, you could try simply turning the indexing service off. This will, however, slow down searches and displays of directories with a large number of files.

Solution 2:

I found this link and it helped (without having to disable libraries or whatsoever...):

http://deputycio.com/8440/deleted-files-not-disappearing-in-windows-7-explorer-without-refresh

In case this link gets outdated some day, here is a quote:

Go to “Folder Options” (my easiest way is Windows key+E to open a Windows Explorer, Press Alt to get the menu, click on Options and Folder options), then click on the “View” tab and click on the “Reset Folders” button. That did it and now files disappear from my view as soon as I delete them.

Hope this helps.

Solution 3:

I think this is a case where several unrelated issues result in similar symptoms. That's why different folks report success with different solutions. Furthermore, several issues can occur concurrently, so fixing one will not resolve all symptoms, leading to the belief that the fix was entirely ineffective.

If this happens consistently with PDF files and only when the Preview Pane in Explorer is open, Adobe Reader is locking your files.1 It's also possible that Reader is locking your files while generating thumbnails. You have the following options:

  1. Disable the Preview Pane.2
  2. Use Unlocker to unlock individual files after previewing, but before deleting, or when the files reappear after a failed delete.3
  3. Install an alternative PDF reader and ensure that it is designated as the preview handler for PDF files. This change may also affect PDF previews in other programs such as Outlook. You do not have to uninstall Reader or Acrobat.

Since I followed through with #3, I'll elaborate on that option. I went with the Sumatra PDF reader, since it's lightweight and does not lock files. You must use the installer version, not the portable version.

When installing, click Options and check Let Windows show previews of PDF documents. If you wish to keep Acrobat or Reader as the default program for actually opening PDF files, avoid checking the Use SumatraPDF as the default PDF reader option.

I can confirm that this fixed the issue for me. Other discussions on the matter recommended renaming the AcroRd32.exe file, but that would disable PDF previews entirely, and it would revert anytime Acrobat/Reader is updated. This is a more elegant solution.


1. Adobe Acrobat ships with a version of Adobe Reader that's used for file previews. Even if you do not have a standalone Reader installed, you will run into this issue with Acrobat. Allegedly, older versions of Reader (5 and 6) do not lock files.

2. I haven't confirmed that Reader locks files on thumbnail generation, but if that's the case, disabling the Preview Pane will not fix this issue. Tentatively, using an alternative view (e.g. List or Details) should help in that regard.

3. You can write an AutoHotKey script to get the currently selected file in Explorer, run Unlocker in commandline mode to unlock that file, then perform a delete or move operation. It might be possible to detect when a file is being moved or deleted in Explorer and use that as a trigger for the script. This is a complex option. I might give it a try, but for now, consider this as an exercise to the reader.