It's not a big problem, but I'm comparing a lot of directories and
desktop.ini keeps throwing off the total file size and file count. How can I make Windows stop generating it, and what does it do?
I found the answer: You can stop auto-generating desktop.ini files by unchecking "Remember each folder's view settings" in the Folder Options/View (or similar) settings. While this will not allow each folder to have its own unique size, view mode, etc., that's fine with me because I want all my folders to look and behave the same way.
"Hide protected operating system files" may treat the symptoms sometimes, but is not really a solution, because while the Windows OS may know to hide the files, other software (duplicate finding/synchronization, other OS's when this disk is shared) may not.
In Windows 7, this should work:
- Open the registry editor (Start → type
regedit→ hit Enter)
- Navigate to the following key:
- Add a DWORD value
UseDesktopIniCache(if it doesn't exist yet), and set its value to 0 (zero)
The desktop.ini file is an actual file, and as such will count as a file, and will take up space on your disk. Your only possible way of avoiding such files from being created is to have very standard folders all accross the board, and if a folder does not deviate at all from the standard, the desktop.ini file may not have to be created. If it shows up in the existing counts, although you have not modified the file's attribute, there is nothing that you can do. However, if your default folder display config is to show all hidden and system files, that may explain why. Try turning this option off in Explorer, and see whether it makes a difference. This also depends on what you use to perform the file count. If you only use the standard Windows Explorer, that's the way of doing it. Otherwise, it depends on what you use to perform the file count.
In Windows 7, if a folder is set as Read-only it will not store any setting changes, so no desktop.ini file will be created. This is a means of altering the behaviour of a particular folder, without making a system-wide change affecting the entire computer.
Attributes of folders can be changed on the command line:
ATTRIB +R C:\DummyPath\FolderName
This change can't be made using Windows Explorer.
In Explorer, if you click "Apply changes to this folder only" the attribute is changed for all the files in the folder, but the attribute is not changed for the folder itself.
If you click "Apply changes to this folder, subfolders, and files" the attribute is changed for all files in the folder and all files in its subfolders, but the attribute is still not changed for the folder itself.