Windows Explorer automatically generates Thumbs.db
files when users browse folders containing images. These database files store thumbnail caches to improve browsing performance locally. However, in network share environments - especially those storing media assets - this behavior creates several issues:
- Unnecessary file clutter in shared directories
- Permission conflicts when multiple users attempt to write the file
- Sync conflicts in version-controlled repositories
- Increased storage consumption across the network
The most effective enterprise solution is deploying a Group Policy setting through the registry:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Explorer]
"DisableThumbsDBOnNetworkFolders"=dword:00000001
To implement this across your domain:
- Create a new GPO in Group Policy Management Console
- Navigate to: Computer Configuration > Preferences > Windows Settings > Registry
- Import the above registry setting
- Link the GPO to appropriate OUs containing your workstations
For non-domain environments or individual machines, modify the local registry:
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "DisableThumbsDBOnNetworkFolders" /t REG_DWORD /d 1 /f
Or use PowerShell for deployment:
$registryPath = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer"
$Name = "DisableThumbsDBOnNetworkFolders"
$Value = "1"
if(!(Test-Path $registryPath)) {
New-Item -Path $registryPath -Force | Out-Null
}
New-ItemProperty -Path $registryPath -Name $Name -Value $Value -PropertyType DWORD -Force | Out-Null
On the server side, implement these complementary measures:
- Existing file cleanup: Create a scheduled task to remove existing Thumbs.db files:
for /r "\\server\share" %i in (Thumbs.db) do del "%i"
- Filescreen: Use FSRM to block Thumbs.db creation:
New-FsrmFileGroup -Name "ThumbsDB" -IncludePattern @("Thumbs.db") New-FsrmFileScreen -Path "\\server\share" -Description "Block Thumbs.db" -IncludeGroup "ThumbsDB"
Even with technical controls in place, user education helps prevent workarounds:
- Explain why Thumbs.db files are problematic in shared spaces
- Train users to utilize alternative file browsers (like Directory Opus) when needed
- Document the approved methods for accessing media files
For teams that frequently browse image collections, consider these alternatives:
- Deploy a dedicated DAM (Digital Asset Management) system
- Implement SharePoint picture libraries
- Use web-based gallery applications
Windows Explorer automatically generates Thumbs.db files in directories containing images when thumbnail preview is enabled. This becomes particularly problematic in network shares where multiple users access the same folders, resulting in:
- Unnecessary file clutter
- Permission conflicts when multiple users try to write to the same Thumbs.db
- Increased storage consumption
- Version control complications
The most effective way to prevent Thumbs.db creation is through Group Policy or registry modification. Here's the registry key that controls this behavior:
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
"DisableThumbnailCache"=dword:00000001
For enterprise deployment, you can push this setting via Group Policy:
<GroupPolicy>
<ComputerConfiguration>
<AdministrativeTemplates>
<WindowsComponents>
<FileExplorer>
<TurnOffThumbnailCache>Enabled</TurnOffThumbnailCache>
</FileExplorer>
</WindowsComponents>
</AdministrativeTemplates>
</ComputerConfiguration>
</GroupPolicy>
For cases where you can't modify client settings, create a desktop.ini file in the shared folder:
[.ShellClassInfo]
IconFile=%SystemRoot%\system32\shell32.dll
IconIndex=123
[ViewState]
Mode=
Vid=
FolderType=Pictures
Then set these attributes:
attrib +s +h desktop.ini
attrib +r "\\server\share\folder"
For existing Thumbs.db files, use this PowerShell cleanup script:
# Recursive Thumbs.db cleaner
Get-ChildItem -Path "\\server\share" -Recurse -Force -File -Filter "Thumbs.db" |
ForEach-Object {
try {
Remove-Item $_.FullName -Force
Write-Host "Removed: $($_.FullName)"
}
catch {
Write-Warning "Failed to remove $($_.FullName): $_"
}
}
If registry modification isn't possible, you can prevent Thumbs.db creation via NTFS permissions:
- Create a deny permission for "Creator Owner" on the root share folder
- Apply these permissions to "This folder, subfolders and files"
- Set the permission to apply to "Only apply these permissions to objects within this container"