Configuring Windows Explorer - desktop.ini

Guess what, besides registry settings which hide various extensions, Windows Explorer has another way to hide data from users. Specifically, when a directory contains a specially formatted and hidden file named desktop.ini, it instructs Windows Explorer not to show you the directory's contents. Instead, desktop.ini identifies another program which formats the display any way it likes.

From one point of view, this is pretty cool - it allows some data to be stored in one format and displayed in another. (Humm, isn't that what applications do?) Only this time, it displays the data in the same tree view as disk directories and files.

On the other hand, I want to know what is on the hard drive, and Windows Explorer is a proven liar.

In my opinion, there is no way that I can describe this type of performance harshly enough.

Background | Examples | Discussion | References | Windows XP


Once apon a time, I copied my Internet Explorer Favorites directory to a floppy. (Hey, you're supposed to make backups aren't you?) You won't believe it, but it took 16 minutes to copy only 171 KB to the floppy. (Yes, I timed it. Ridiculous would be a kind comment.)

During the copy, I noticed that there where a large number of files named desktop.ini. Funny, none of these showed up using Windows Explorer.

When I searched the Favorites directories for desktop.ini, nothing was found. This was strange since I saw them being copied to the floppy.

Well, they do show up using dir /a from a DOS prompt. attrib shows that they are hidden files. Humm. I have Windows Explorer configured to show hidden files.

I already knew that Explorer won't show hidden system files, but this is different - the desktop.ini files are only hidden ... and other hidden files are displayed.

I created a desktop.ini in one of my personal Favorites directories and set the attributes to hidden ... Windows Explorer still showed it. This was interesting! Find Files also found it ... but none of the others.

Snooping in the registry revealed that the find function is implemented via Windows Explorer (C:\WINDOWS\Explorer.exe to be precise).

Working from a DOS prompt

   C:\WINDOWS\Favorites>dir /s/a *.ini > ttr.txt
only returned the one I created. Humm!
   C:\WINDOWS\Favorites>attrib /s *.ini > ttr.txt
This caught 42 of these magic files (plus one more for mine). The /s causes the 2 commands to recurse all sub-directories.


This is the contents of C:\WINDOWS\Favorites\Channels\News and Technology\desktop.ini which is visible in Windows Explorer even though Find Files can't see it. This is the contents of C:\WINDOWS\Favorites\Channels\Disney\desktop.ini which can only be seen via DOS I edited the contents of my desktop.ini file to match the one above, but it still displays and is still found.

If you edit one of the desktop.ini files and then re-name the associated directory, you can make the directory contents appear and/or disable the new icon. Refreshing Windows Explorer has no effect - you must re-name the directory to see the difference!


I always wondered why Microsoft stopped calling the file structure directories and started to use the word folders. Now I can see why.

Windows XP

With Windows XP, it appears that the search function now finds and displays a few desktop.ini files. Even the one in c:\windows\fonts showed up.

So what, Agent Ransack (free) can completely replace the Windows Explorer search function - it even improves how the results are displayed.

Find desktop.ini on XP

This is unbelievable - don't waste your time with the XP search feature.


Author: Robert Clemenzi -
URL: http:// / user / clemenzi / technical / ie / WinExplorer / desktop_ini.htm