Thumbs.db, Desktop.ini, and .DS_Store Files Explained
Understanding and Managing Hidden Files
To view files that are normally concealed from sight, configure your file manager to display hidden items. Upon doing so, you will likely discover numerous temporary or system-related files distributed throughout your directories.
Windows operating systems automatically generate files such as thumbs.db and desktop.ini within various folders. Similarly, Mac OS X creates files named .DS_Store.
Why These Files Are Created
Typically, these files remain invisible to the average user. They are designated as hidden files and only become visible when you specifically enable the display of hidden items in your file manager settings.
The operating system generates these files to enhance performance and retain configuration settings for subsequent use. This process streamlines future interactions with those folders.
Controlling Hidden File Creation
While these files serve a purpose, it is possible to prevent the creation of certain ones. This can be useful for maintaining a cleaner file system.
By understanding the function of these hidden files, users can better manage their storage space and system settings. Adjusting file manager settings allows for greater control over file visibility.
Understanding the thumbs.db File
Related: Methods for Displaying Hidden Files and Folders within Windows
The thumbs.db file functions as a thumbnail database, as its name suggests. When a folder is accessed using Windows Explorer or File Explorer and contains image files, Windows automatically generates thumbnail previews of these images.
To optimize future performance, these thumbnail images are stored within a thumbs.db file created in that particular folder. This allows Windows to quickly reload the thumbnails instead of recreating them each time the folder is opened.
Generally, this process operates seamlessly and remains unnoticed by the user, as these files are hidden by default. However, certain scenarios can lead to complications. For instance, uploading directories to a web server may inadvertently include these thumbs.db files.
Preventing the creation of thumbs.db files is possible, though typically unnecessary for most users. This can be achieved through either the Group Policy Editor (available on Professional or Enterprise editions of Windows) or the Registry Editor (for Home editions of Windows).
To modify this setting via Group Policy, initiate the Run dialog by pressing the Windows key + R, then type "gpedit.msc" and press Enter.
Within the Group Policy Editor, navigate to User Configuration > Administrative Templates > Windows Components > File Explorer (on Windows 10, 8.1, or 8). On Windows 7, the path is User Configuration > Administrative Templates > Windows Components > Windows Explorer.
Select and double-click the option labeled "Turn off the caching of thumbnails in hidden thumbs.db files" and configure it to "Enabled".
For Windows Home editions, access the Registry Editor by pressing Windows Key + R, typing "regedit", and pressing Enter.
Navigate to the following key: "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ Explorer\Advanced". Locate the "DisableThumbnailCache" setting in the right pane and set its value to "1".
If the "DisableThumbnailCache" option is not present, right-click within the right pane, select "New", and create a DWORD value named "DisableThumbnailCache". Subsequently, modify its value to 1.
To revert this change, either delete the value or reset it to "0".
Understanding desktop.ini Files
The desktop.ini file is a hidden file created by Windows operating systems. It's concealed not only as a hidden file, but also as a protected system file.
Visibility of these files is restricted unless the "Hide Protected Operating System Files (Recommended)" option is disabled within File Explorer or Windows Explorer's Folder Options.
Purpose of desktop.ini
Windows utilizes desktop.ini files to define how folders are presented to the user. This includes aspects like folder icons and display settings.
For instance, the system employs these files to prevent accidental relocation of critical system folders, displaying a warning message when a move attempt is made.
Unique folder icons are also managed through the information contained within the desktop.ini file.
Preventing Creation and Visibility
Currently, there is no known method to stop Windows from automatically generating these files.
However, users can choose to suppress their visibility by keeping the "Hide Protected Operating System Files (Recommended)" setting enabled.
This ensures a cleaner file explorer view by concealing these system-related files.
Understanding .DS_Store Files
Related: Methods for Hiding Files and Displaying Hidden Files on Mac OS X
The .DS_Store file is a creation of Mac OS X. Functioning in a manner comparable to Windows’ desktop.ini files, these files are generated within each directory. Due to the leading period – a "." character – they are, by default, concealed on Mac OS X and other Unix-based systems.
These files are not typically visible in Finder or other standard utilities unless you specifically configure your system to show hidden items. The .DS_Store file stores data pertaining to icon arrangement within a folder, the folder’s background imagery, and other visual settings.
How .DS_Store Files Function
When a folder is opened in Finder, the application references this file to determine how to present the folder’s contents. Any alterations made to these settings are subsequently saved back into the .DS_Store file.
A common scenario involves Macs automatically generating these .DS_Store files even on shared network folders. This can introduce unwanted clutter, particularly for users operating on Windows systems.
Preventing .DS_Store Creation on Network Drives
Mac OS X provides a mechanism to disable the creation of .DS_Store files, but this functionality is limited to network drives. To implement this, access a Terminal window (Command+Space, type "Terminal", then Enter, or navigate to Applications > Utilities > Terminal).
Execute the following command within the terminal and press Enter:
defaults write com.apple.desktopservices DSDontWriteNetworkStores true
To revert this change and re-enable .DS_Store file creation on network drives, utilize this command:
defaults write com.apple.desktopservices DSDontWriteNetworkStores false
Currently, preventing the creation of .DS_Store files locally requires employing third-party solutions. However, maintaining hidden files disabled within Finder will prevent their visibility and minimize any potential disruption.
These files can sometimes interfere with the operation of certain applications, such as version control systems or file uploading tools. Ideally, these programs should be configured to automatically disregard files like thumbs.db, desktop.ini, and .DS_Store.
If you encounter issues with a specific program, investigate whether it offers an option to ignore these files entirely, streamlining your workflow and avoiding potential conflicts.