Getting Rid of Hidden Thumbs.db Files

by Barry Dysert
(last updated November 17, 2014)

7

Hannah has her system configured to display hidden files. (As she says, she likes to see what is really on her hard drive.) Hannah noticed that a lot of folders have a common hidden file in them: Thumbs.db. She knows that these weren't files that she created, so she figured that either Windows or some program on her system was creating them.

Thumbs.db is a (typically) hidden file that contains thumbnail images to represent picture files in a folder. This file is automatically built when you access a folder that contains pictures so that the thumbnails can be cached and the folder contents displayed more quickly (after the first time). Unfortunately, Thumbs.db is often kept open by Windows, thus preventing you from deleting the folder that contains the file.

You can both get rid of Thumbs.db files as well as prevent them from being created in the first place so as to avoid any problems in the future. Deleting Thumbs.db is perfectly safe—there is no harm in doing so—because Windows will simply recreate the file if it doesn't exist.

In order to see if you even have the Thumbs.db file in a folder, you must first ensure that the folder's setting is such that you can see hidden files, just as Hannah did. If you are using Windows 7 you do this by navigating to the folder, clicking Tools | Folder Options to display the Folder Options dialog box. If you are using Windows 8 you display the same dialog box by displaying the Control Panel, clicking the Appearance and Personalization link, and then clicking the Show Hidden Files and Folder link (under the Folder Options section).

Once the Folder Options dialog box is displayed, click the View tab. (See Figure 1.)

Figure 1. The View tab of the Folder Options dialog box.

In the Advanced Settings list there is a Files and Folders category under which is a "Hidden Files and Folders" category. Under there are two radio buttons. Click the one named "Show Hidden Files, Folders, and Drives" and click OK. If there is a Thumbs.db file in a folder, you will now see it.

At this point you can treat it like any other file—simply right-click on it and choose to delete it. If you cannot delete the file (Windows won't let you) it is most likely because Windows has the file open. Why would it be open? Because there might be images in the folder for which Windows is displaying thumbnails. In such a case you might not be able to delete the file until you move all the images out of the folder and then, possibly, restarting your system. (Restarting forces Windows to close the Thumbs.db file and it won't reopen the file when you again display the folder because there are no images in the folder requiring the thumbnails.)

If you want to configure your system so that it doesn't use Thumbs.db files, you can do so via the Local Group Policy Editor. This tool is available only in some versions of Windows. To see if it is available in yours, invoke Windows' search capability and search for "gpedit.msc" (without the quotes). If Windows finds it, double-click it to start the editor.

Using the left-side navigation pane, expand the various levels for User Configuration | Administrative Templates | Windows Components | Windows Explorer. (Actually, it is only Windows Explorer in Windows 7; in Windows 8 you want to select File Explorer. Microsoft renamed Windows Explorer to File Explorer when it released Windows 8.) If you are using Windows 7, click the setting in the right pane titled "Turn Off the Caching of Thumbnails in Hidden Thumbs.db Files." If you are using Windows 8, click the setting titled "Turn Off Caching of Thumbnail Pictures." (See Figure 2.)

Figure 2. The Local Group Policy Editor dialog box.

If you double-click this setting another dialog box opens, allowing you to enable or disable it. If you want the system to use Thumbs.db files, leave the setting as "Not configured." If you don't want your system to use Thumbs.db files, then disable the setting from the dialog box and click OK.

 This tip (12162) applies to Windows 7 and 8.

Author Bio

Barry Dysert

Barry has been a computer professional for over 30 years, working in different positions such as technical team leader, project manager, and software developer.  He is currently a senior software engineer with an emphasis on developing custom applications under Microsoft Windows. ...

MORE FROM BARRY

Using Your Own Picture as an Account Picture

You can easily customize your computing experience by using your own picture as your account picture. This tip explains how.

Discover More

CutePDF Writer

CutePDF Writer is an extremely versatile utility that allows you to create PDF files from virtually any application that ...

Discover More

Running a Batch File at a Scheduled Time

Once you become comfortable with batch files, chances are that you'll want to use them to perform various system maintenance ...

Discover More
More WindowsTips

Rebuilding the Search Index

There may be times when you want to reset the search index and rebuild it from scratch. This tip tells you how.

Discover More

Copying Data with Robocopy

Robocopy is a robust file copy utility built into Windows. If you have a lot of file management to do that can't easily be ...

Discover More

Creating a Hierarchy Map of Your Hard Drive

Want to see how the directories and subdirectories in your hard drive are organized? It's easy to do using the directions in ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in WindowsTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] in your comment text. You’ll be prompted to upload your image when you submit the comment. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is five minus 0?

2016-12-01 09:56:45

Punxsutawney

You can also disable it, using the following registry keys:

[HKEY_CURRENT_USERSoftwarePoliciesMicrosoftWindowsExplorer]
"DisableThumbnailsOnNetworkFolders"=dword:00000001
"DisableThumbsDBOnNetworkFolders"=dword:00000001

Extracted from: http://www.sysadmit.com/2016/11/gpo-evitar-creacion-thumbsdb-en-red.html


2015-07-23 05:18:35

Shreepad S M Gandhi

Very informative...Thanks Barry


2015-07-22 16:49:22

Conor

I just hid them, no point in deleting to be honest.. just click on the hide protected operating system files and youll be fine, they dont take up any memory and theyll be out of yourmind :)


2015-04-29 12:48:27

Ric Thayer

I followed the directions, and made the thumbs.db files visible.

Our system administrator has blocked access to gpedit.msc, but I went to regedit, and created a DWORD named DeleteThumbnailsCache, and set the value to 1. (HKEY_CURRENT_USER/Software/Microsoft?Windows/CurrentVersion/Explorer/Advanced) I am using Windows 8.1.

I moved all of the images from the folder, and restarted my system. I still cannot delete the file, and get the message telling me that it is open in Windows.

Suggestions?


2015-01-06 07:19:29

Barry

Good catch, Matt.


2015-01-06 05:45:58

Matt

Great article, just noticed a typo I think, in the thumbs.db group policy, shouldn't you 'enable' (rather than 'disable') the setting to stop the system from creating thumbs.db files, as it is worded "Turn off the caching of thumbnails in hidden thumbs.db files"

The help in the policy setting states:

"If you enable this policy setting, File Explorer does not create, read from, or write to thumbs.db files.

If you disable or do not configure this policy setting, File Explorer creates, reads from, and writes to thumbs.db files."


2014-12-28 10:26:49

Thor-Atle Ryn

Great help.
Thank you!!


Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in WindowsTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.