whatfileis.pro
Paste a filename and find out what it is, whether it is safe, and what opens it.

Can't Delete a Folder Because of Thumbs.db?

A folder won't delete, you get file in use, and the culprit is a hidden Thumbs.db that keeps coming back. Here is how to clear the lock, delete it safely, and stop Windows creating it.

Category
Safe to delete?
Opens with

Fix: a folder will not delete because of Thumbs.db

  1. Close the Explorer window showing that folder and any preview pane — Explorer locks Thumbs.db while generating previews.
  2. If it is still locked, open Task Manager → Details, find explorer.exe, end it, then restart it from File → Run new task → explorer.exe.
  3. On a network share, the lock is usually another machine browsing the folder; wait or disable thumbnail caching (below).
  4. Then delete the folder, or remove the file first: in that folder run del /a:h Thumbs.db from an elevated Command Prompt (/a:h targets the hidden file).

Stop Thumbs.db from reappearing

In File Explorer Options → View enable Always show icons, never thumbnails, or via Group Policy: User Configuration → Administrative Templates → Windows Components → File Explorer → Turn off the caching of thumbnails in hidden thumbs.db files. To keep it out of a Git repo, add Thumbs.db to .gitignore.

What Thumbs.db is

Thumbs.db is a hidden Windows file that caches thumbnail images for a folder — so photo and video previews load instantly the next time you open it.

Why it can be a nuisance

It appears on network shares and in backups, and it can lock a folder ("file in use") when you try to delete or rename the folder while Explorer is generating thumbnails.

How to disable it

In File Explorer Options → View, enable Always show icons, never thumbnails, or via Group Policy: User Configuration → Administrative Templates → Windows Components → File Explorer → Turn off the caching of thumbnails in hidden thumbs.db files.

Is it safe to delete?

Yes. Windows rebuilds it as needed; you only lose the cached previews, which regenerate.

How to handle a Thumbs.db file by OS

Windows: Thumbs.db is a hidden cache of thumbnail images for a folder. You don't open it; show hidden files to see it. To view the thumbnails inside, use a Thumbs.db viewer utility.

macOS / Linux: appears when browsing Windows folders; it has no use and can be ignored or deleted.

Common problems

Thumbs.db can lock files on network shares and block folder deletion. Disable it via Group Policy (Turn off caching of thumbnails in hidden thumbs.db files) if it's a nuisance.

FAQ

How do I delete a folder that says Thumbs.db is in use?

Close the Explorer window and preview pane (they lock the file), or restart explorer.exe from Task Manager, then delete. On a network share, disable thumbnail caching via Group Policy.

Is it safe to delete Thumbs.db?

Yes. Windows recreates it when it needs thumbnails again.

How do I stop Windows creating Thumbs.db?

Turn on 'Always show icons, never thumbnails' in File Explorer Options, or disable it via Group Policy.

Why can't I delete a folder because of Thumbs.db?

Explorer may be using it to build previews. Close the window or wait, then try again.

Other file types explained