How do I unlock thumbs DB?

Thumbs.db is a small hidden system file that gets generated when you view media in a folder, you know when you look at all your MP3 songs and you can see the album cover as a thumbnail? Or you can see what all your photos are as a tiny thumbnail before you open them, well thats what the thumbs.db file is doing. It’s a tiny cache of all that information so next time someone visits this folder it displays those pictures quicker. Well that’s great! But when you try and delete a folder with one in (particularly a folder on another machine) you can see the error below.

How do I unlock thumbs DB?

The file Thumbs.db is a system file if you remove it, Windows or another program may no longer work correctly.

Then it won’t let you delete it, and if you persist, you end up with a folder with just this file in it, that you cant delete.

Solution

First Step – Delete the Thumbs.db file

OK, lets solve the initial problem first and get rid of the one thats annoying us at the moment.

1. In Windows 8/2012 whilst in the folder > File > Open command prompt as administrator. (With older versions of windows hold down SHIFT and right click).

How do I unlock thumbs DB?

2. Issue the following commands;

attrib -s -h thumbs.db del thumbs.db

How do I unlock thumbs DB?

Stop your PC Generating Thumbs.db Files

Option 1

Open Windows Explorer > View Options > Change folder and Search Options > View > Enable ‘always show icons, never thumbnails’ > Apply > OK.

How do I unlock thumbs DB?

Option 2 (Use the Local Policy of the Machine)

1. Press Windows Key+R to launch the run menu > gpedit.msc > OK.

How do I unlock thumbs DB?

2. Navigate to;

User Configuration > Administrative Templates > Windows Components > File Explorer {or Windows Explorer}

Locate the ‘Turn off caching of thumbnail pictures’ policy.

How do I unlock thumbs DB?

3. Enable > Apply > OK.

How do I unlock thumbs DB?

Option 3 (Use the Registry)

You can simply run the following command;

REG ADD “HKCUSoftwarePoliciesMicrosoftWindowsExplorer” /v “DisableThumbsDBOnNetworkFolders” /t REG_DWORD /d 1 /f

Even though both Windows and its users have made the jump to the 21st century, there’s still some lingering 1990s-era annoyances hiding out in the OS including Windows’ tenacious desire to create thumbnail files (and then refusing to delete them). Read on as we solve the “File In Use” deletion error problem.

What’s the Problem?

When you’re tidying files, deleting older archives, or otherwise cleaning up after yourself it’s not uncommon to run into  the very annoying “File In Use” error. The way the error crops up usually goes like this. You look at a folder, decide you no longer need said folder and its contents, but when you attempt to delete the folder you get an error message that looks like this.

How do I unlock thumbs DB?

Windows will happily delete the contents of the folder but it won’t delete the folder and the “Thumbs.db” file will persist. You can click “Try Again” all day and it won’t budge. Yet if you move on in frustration and sort and purge more folders you’ll find that you can then return and delete the original folder and the pesky Thumbs.db file inside. What gives?

Windows has a very sensible policy that prevents the deletion of files currently in use by the operating system or an application. That’s a great policy to have and, on its own, it rarely causes any issues. Unfortunately Windows also has another policy that all folders with visual media (image files and movies) should have a database of thumbnails to provide thumbnail images for the files if the user switches to any of the available thumbnail views.

When you open the folder to check the contents Windows loads the Thumbs.db file into Windows Explorer. When you go to delete the folder, Windows refuses because the Thumbs.db is currently in use by Explorer. The reason you can return to the stubborn folder later and delete it successfully is because  either enough time has elapsed and Windows has unloaded the Thumbs.db or since then you’ve loaded another folder and that folder’s Thumbs.db replaces the previous Thumbs.db and now the original Thumbs.db is no longer locked by Windows and the annoying “File In Use” error vanishes. That’s great but now the new Thumbs.db file is locked and the cycle of frustration continues.

Microsoft kind-of-sort-of fixed this issue in the transition between Windows XP and Windows Vista by shifting thumbnail creation on local drives to a centralized location. In Windows Vista (as well as Windows 7 and Windows 8) thumbnails are stored in a central database located at %userprofile%\AppData\Local\Microsoft\Windows\Explorer instead of in every individual folder. While that cleared up most deletion problems and decluttered user folders, the Thumbs.db problem persists to this day when working with network/remote drives and folders.

Let’s look at several solutions, both temporary and permanent, you can use to banish this annoying error.

Fixing the Error

There are several ways you can work around the error that range from temporary solutions (so you many continue to use the thumbnail feature) to permanent ones (wherein you won’t have to worry about the problem popping up again). We’ll start with the temporary solutions, which are handy if you’re using a work computer where you don’t have the privileges to make changes.

Note: If you’re having issues with the Thumbs.db in Windows XP, please refer to this tutorial for techniques on disabling thumbnails in XP; this tutorial is focused on the new thumbnail system found in Windows Vista and newer installations.

Temporarily Disable Thumbs.db Access

Windows only uses the thumbs database if you’re browsing files in Windows Explorer with a view that requires Explorer to pull thumbnail data for display. Thus a very handy work around that’s both temporary in the application sense (you don’t have to disable system wide thumbnails) and the chronological sense (it persists only as long as you have a single non-permanent setting changed) is to switch your Windows Explorer view to “Details.”

How do I unlock thumbs DB?

You can access it via File -> View -> Details or via the right-click context menu within the folder you’re working. If you’re doing a lot of work with many folders, you may wish to change the folder view across the entire system by navigating to File -> View -> Options and then in the Folder Options menu, selecting the View tab and then the “Apply to Folders” button to apply the view selection you made to all folders.

Now when you’re sorting and purging your folders the thumbnail database file will remain unloaded and you can delete folders without interference. This solution is ideal if you actually want thumbnails for your remote drives but you don’t want them in the way when you’re doing serious folder management.

Disabling Network Thumbnail Creation

If the “File In Use” error is infuriating enough that you just want those irritating Thumbs.db files gone forever from your network drives, the best practice is to outright disable their creation. This will not stop Windows from creating and caching local thumbnails (such as those that would appear in your local photo libraries); those thumbnails will still be generated and stored in the centralized database we mentioned earlier in the article. It will disable all future thumbnail database creation on remote drives.

Via the Group Policy Editor

For users running versions of Windows Vista, Windows 7, and Windows 8 that have access to the Group Policy Editor (found only in editions above the Home Premium level like Windows 7 Professional and the like), you can disable network thumbnail generation through the policy editor.

Open the Local Group Policy Editor by typing “gpedit.msc” in the Start menu run box. In the policy editor navigate to following location, using the left hand navigation panel, based on your version of Windows.

Windows Vista and Windows 7 users should use navigate to User Configuration -> Administrative Templates -> Windows Components -> Windows Explorer.

Windows 8 users should navigate to User Configuration -> Administrative Templates -> Windows Components -> File Explorer.

How do I unlock thumbs DB?

Users of all three operating systems should then look in the right hand panel where the configuration settings are listed and sort the settings by name by clicking on the title of the Setting column as seen in the screenshot above. Look for the entry “Turn off caching of thumbnails in hidden thumbs.db files” and double click on it.

How do I unlock thumbs DB?

By default it is set to “Not Configured.” Change it to “Enabled.” Click OK to save the setting and then reboot your computer for it to take effect. Henceforth, Windows will no longer generate Thumbs.db files while browsing network drives.

Via the Registry Editor

For users without access to the policy editor, a registry hack is required to create the same effect. Be forewarned that playing in the Windows registry is serious business, and you should triple check every change you make before committing to it.

To access the registry editor type “regedit.exe” in the Start Menu run box and hit enter. Where the registry key is found varies based on your version of Windows.

Windows Vista and Windows 7 users need to navigate to the following registry key:

HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\Explorer\

Within that key edit the REG_DWORD entry “DisableThumbsDBOnNetworkFolders” to the value “1” (the default is 0).

Windows 8 users have a trickier time of it as there is no matching key to be found in \Policies\Windows\. In order to enable the same value on Windows 8 you need to create both the missing key and the value. Navigate to this key.

HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\

Right click on the \Windows\ key and select New -> Key. Name the new key “Explorer”. Within the new key right click on the right navigation panel and select New -> DWORD. Name the DWORD entry DisableThumbsDBOnNetworkFolders. Right click on it and modify it to change the value from 0 to 1.

How do I unlock thumbs DB?

If you’re not comfortable editing an existing value or creating a new value altogether, you can create a registry file by pasting the following text into Notepad as saving the file with a “.reg” instead of a “.txt” extension. Double click on the file to annotate the registry.

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\Explorer]
“DisableThumbsDBOnNetworkFolders”=dword:00000001

This registry file will work for Windows Vista, Windows 7, and Windows 8.


With the above edits in place you’ll no longer need to deal with finnicky Thumbs.db files on your network shares; cleaning and organizing your folders will be a smooth experience without the constant frustration of locked files.

How do I delete a locked thumbs db?

db file, use these steps:.
Open File Explorer on Windows 10..
Navigate to the folder you want to delete..
Click the View tab..
Check the Hidden items option..
Under the “Layout” section, select the Details view option..
Select the thumbs. db file. ... .
Click the Delete button from the “View” tab..
Click the Yes button..

What is thumbs db and why can I delete it?

In Windows, thumbs. db files are database files containing the small images displayed when you view a folder in Thumbnail view (as opposed to Tile, Icon, List, or Detail view). These files are automatically generated by Windows, and there is no harm in deleting them or excluding them from system backups.

Can't delete thumbs db used by another process?

Deleting a file named thumbs. db is possible, by first renaming the file (e.g. into x. db). After renaming the file, deleting is no problem.