Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question
add comment

4 Answers

It keeps the preferences for the layout of that folder. If there is any deviation from the standard layout of a folder, then a desktop.ini is created. You can hide it by selecting the "hide protected operating system files" option in windows explorer.

share|improve this answer
    
I appreciate the answer, but I really wanted to know how to stop generating it in the first place. I already know how to hide it; I'd rather it not exist to begin with. I'd rather stop litter than hide it! In the end I figured it out (see my answer). –  Fred Hamilton Aug 23 '09 at 17:42
2  
It's not litter if it serves a purpose. Most sync or compare software can have exclusions added to avoid certain files. Glad you figured it out. –  MDMarra Aug 23 '09 at 18:11
add comment
up vote 7 down vote accepted

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:

  1. Open the registry editor (Start → type regedit → hit Enter)
  2. Navigate to the following key:
    HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer
  3. Add a DWORD value UseDesktopIniCache (if it doesn't exist yet), and set its value to 0 (zero)

Source: Nevermore Be Bothered by Desktop.ini

share|improve this answer
1  
This option is not there in Windows 8 and Windows 7. Any alternative? –  Ashwin Sep 12 '12 at 14:02
    
Ah, this is good to know! I've had two desktop.ini files sitting on my desktop for some time, and never got around to figuring out if they were safe to delete. –  SaintWacko Sep 12 '12 at 14:04
    
@SaintWacko For the record, the reason you have two is because the "desktop" you see is actually a union combination of your user's "Desktop" folder and the "Desktop" folder belonging to all users. Things placed in the former appear to you only and things placed in the latter appear to every user. –  Bob Oct 21 '13 at 14:17
add comment

desktop.ini stores information about "special" qualities for folders, such as fancy icons, or displaying the file listings in a different way from default. It's harmless, and really I'd reccomend just subtracting one ;)

share|improve this answer
    
Thanks for the response, but when I'm trying to determine if two directories are the same (to the first order with good accuracy - I know this is not fool-proof), the byte count is a pretty good indicator. Desktop.ini can mess this up, and I don't want to have to manually check if desktop.ini exists, then if it does, subtract its byte count from the total. –  Fred Hamilton Aug 23 '09 at 17:39
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.