generated thumbs.db file

619 views
Skip to first unread message

Alex Li

unread,
Feb 16, 2021, 2:23:38 AM2/16/21
to OneCommander
I found a couple of thumbs.db files here and there. 

Don't know who created them (it could be either windows file explorer or onecommander)
but I am unable to delete them --- whenever I attempt to delete them, there is an error msg indicating "the action can't be completed because the file is open in One Commander V3" (see the attached img)

Untitled.jpg

These thumbs.db files really bother me. I've already turned down the thumbs.db in Windows . Moreover, I've collapsed all preview panels in OneCommander so as to prevent it from getting thumbnail or full preview.

Questions:
1. can we confirm if it's  One Commander V3 that has generated these thumbs.db files?
2. if it's One Commander V3, do we have any particular purpose? Is generating or reading thumbs.dbs necessary?
3. if it's unnecessary, can we stop generating thumbs.db in future versions of OC3?

Thanks


Version Info 
  • Program version: 3.0.0.555, Portable
  • Win ver: Win 10

Milos Paripovic

unread,
Feb 18, 2021, 8:49:47 PM2/18/21
to OneCommander
I have not seen those in years... Is that a network drive? 
One Commander asks Windows for file thumbnail. Windows checks its own thumbnail cache and if there is a thumb it returns it, and if not Windows extracts a thumbnail, gives it to OC, and saves it for future use. On local drives it saves all thumbs in one file somewhere in Windows folder, but on network drives it saves it in individual folders. OC doesn't directly create those files, but they get created by Windows when it asks for thumbnail. If Preview is collapsed it should not ask for thumbnail.

Quick search shows
Win+R, type gpedit.msc
User Configuration > Administrative Templates > Windows Components > File Explorer
Double click on Turn off the caching of thumbnails in hidden thumbs.db files.
Click Enabled (enabled means off)
Restart

If it is not a network drive, check if it is something other than NTFS formatted, or if there is something else particular with that disk?

Marcel Tilloca

unread,
Mar 26, 2023, 7:02:18 AM3/26/23
to OneCommander
I've "solved" this by creating i new script item  called "Delete This Folder with Thumbs"

with these comand lines:
 
#PS
#above line indicates to run the rest with Powershell
#$CurrentDir is provided by OC and it adds ' around name
#use ' everywhere or test escaping double quotes

Remove-Item $CurrentDir -include "thumbs.db" -recurse -force

after running it thumbs.db files are gone and yu can delete the directory from the network share.




Marcel Tilloca

unread,
Mar 26, 2023, 7:21:26 AM3/26/23
to OneCommander
Sorry "solution" is not yet consistent, sometimes does not work, but seems a way leaving place to further exploration

Milos Paripovic

unread,
Mar 26, 2023, 1:37:29 PM3/26/23
to OneCommander
Even when you delete that thumbs.db file, as soon as OC requests thumbnail from windows shell, the shell will extract thumbnail and create that file, then it keeps the handle to it open until some other folder with thumbs.db is opened. It is a bug in WIndows thumbnail handler. I will soon work on thumbnail database that won't depend on windows thumbnail storage and shouldn't use that thumbs.db file

Marcel Tilloca

unread,
Mar 28, 2023, 5:07:41 PM3/28/23
to OneCommander
Thanks for the details.

The problem is not with the thumbs.db being recreated, but removing it before folder deletion/move.
This script is working for me if the file is not being kept open by an actual process like quicklock for example (happened to me):

#PS

cd $CurrentDir

Get-ChildItem -Path . -Include Thumbs.db -Recurse -Name -Force | Remove-Item –Force

I used it on 10 different net share folders with thumbs.db inside and was able to delete all of them, including all subfolers in one go each time

Milos Paripovic

unread,
Mar 28, 2023, 5:21:37 PM3/28/23
to OneCommander
One problem that can still arise is that even if you delete all thumbs.db, and then you click a folder you want deleted, the preview pane will request a thumb of the clicked folder, and it will initiate extracting of thumbs of folders within, so the new one might be created and handler might still be holding the handle to it open
Reply all
Reply to author
Forward
0 new messages