Share via

Why does Microsoft now hide the Thumbs.db file where you cannot see it anywhere, but it's still there?

Anonymous
2024-12-15T00:38:09+00:00

So I have a massive library of images (4,500,000) but they are sorted rather well. I use Word to create flyers of these images. A directory listing will show the correct number of images, and only the images. Same thing with a Command Prompt.

However, in Word, when I get the directory contents via:

Set fileSystem = CreateObject("Scripting.FileSystemObject") 

Set folder = fileSystem.GetFolder(folderPath)

I get an extra file ... Thumbs.db. Now, I've set my options to not generate this file, show hidden and system files, and yet no other program can see this file, but Word. Why is this the case? How do I remove these files and stop windows from generating them FOREVER.

Gary Smith


Update. The thumbs.db cannot be found using PowerShell. However, inside .NET (VisualBasic), calling Directory.GetFiles(Path) will get this file. Why is it so difficult to get rid of this file?

Windows for home | Windows 11 | Performance and system failures

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

2 answers

Sort by: Most helpful
  1. Anonymous
    2024-12-17T09:17:15+00:00

    I finally removed (or disabled them) for what it's worth. I don't know what I did to stop them from generating, plus I added code into my Word scripts to only accept .jpg files and ignore the rest.

    It just seems I get afraid to do an update on windows because I never know what Microsoft is going to change or undo.

    G.

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2024-12-17T08:54:55+00:00

    Hello, Gary L. Smith_2000.

    We appreciate you posting in Microsoft community.

    Benefiting from your detailed description, I noticed you have some questions about the Thumbs.db file in Windows.

    I'm glad to have the opportunity to help you analyzing this.

    Let’s start with some explanations:

    Thumbs.db is a hidden file generated by the Windows operating system that is mainly used to store thumbnail caches of image files. Its main function is to speed up the preview of images in a folder, especially in folders containing a large number of images.

    The Thumbs.db file is usually labeled as a “hidden” and “system” file. Even if you choose to show hidden and system files in Windows Settings, some programs (such as File Explorer and PowerShell) may still not show it.

    When using a program such as Word, you may be able to programmatically access the contents of a folder and discover the existence of the Thumbs.db file. This is because Word uses an API that may list all files, including those marked as hidden or system files.

    On the other hand, PowerShell and some other tools may follow different rules, causing them to fail to detect the Thumbs.db file.

    You can refer to this article about how to remove it:

    Should I delete an unknown thumbs data base file from my computer? - Microsoft Q&A

    Feel free to let me know if I have not made it clear or you need more help.

    Best Regards.

    Jeffrey - MSFT | Microsoft Community Support Specialist

    Was this answer helpful?

    0 comments No comments