Getting Rid of Hidden Thumbs.db Files

by Barry Dysert
(last updated September 10, 2018)

4

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). If you are using Windows 10 you display the same dialog box by opening File Explorer, click on the View tab of the ribbon and then on the Options button.

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 | File Explorer. (Actually, it is Windows Explorer in Windows 7; in Windows 8 and Windows 10 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 or Windows 10, 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 don't 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 enable the setting from the dialog box and click OK.

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

Author Bio

Barry Dysert

Barry has been a computer professional for over 35 years, working in different positions such as technical team leader, project manager, and software developer. He is currently a software engineer with an emphasis on developing custom applications under Microsoft Windows. When not working with Windows or writing Tips, Barry is an amateur writer. His first non-fiction book is titled "A Chronological Commentary of Revelation." ...

MORE FROM BARRY

Pinning a Shortcut to the Taskbar

It's usually easy to pin items to the Taskbar. But if what you want to pin is not a shortcut to an application? This tip ...

Discover More

Moving and Resizing Windows

The ability to work on multiple things simultaneously is a hallmark of Windows. If you have many windows up at once, ...

Discover More

Understanding User Account Types

Windows supports three different types of user accounts. The type of account associated with a user is determined by how ...

Discover More
More WindowsTips

Working with Compressed Files and Folders via Zip

Windows 10 provides multiple ways to work with compressed files and folders. One great way is to use the Zip utility, ...

Discover More

Customizing the Explorer's File List Display

Windows Explorer is a powerful utility to use for navigating among your files and folders. And it can be customized a ...

Discover More

Displaying Details about an Audio File

Audio files have additional attributes that other files don't have. This tip describes how you can display these ...

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. Maximum image size is 6Mpixels. 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 three more than 8?

2018-09-10 13:02:11

MW

Will, if you are running the Home version (or maybe Student ver) of Win10 gpedit is not available or even included by default. It is typically available on Win 10 Pro versions.

However if you do a web search there are numerous ways to download and load gpeditor even on Win10 Home versions. Just be carefull where you download from......


2018-09-10 12:23:53

Barry

Will, as far as I know, gpedit.msc *is* the group policy editor, so if that's not there, then you don't have it.


2018-09-10 12:20:17

Will

Is there a group policy editor if gpedit.msc is not on this machine?


2018-09-10 07:38:49

Tom

I found that it isn't necessary to restart the computer to get windows to close the thumbs.db file. If you go to another folder and open a picture, Windows seems to close the other file which allows you to delete the file. Not a solution but if you want to keep the thumbs.db file creation active, this is a work around to delete other files.


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.