So it’s a lazy Sunday afternoon and you’re browsing through some old pictures on your external drive when you stumble upon a file that definitely isn’t a photo.
It’s called desktop.ini and it’s pretty annoying because it shows up everywhere. It ruins the neatness in sorting files and just doesn’t belong.
This ubiquitous file somehow finds its way into almost every folder on your computer.
Looking at some songs? There’s a desktop.ini file hanging out with Pink Floyd and Pete Rock.
What about videos? Yep, desktop.ini is hanging out with your home videos too.
What’s going on?
Desktop.ini has a purpose
First of all, contrary to what some people believe, desktop.ini isn’t a virulent file designed to destroy your computer; it actually serves a good purpose.
If you tried opening one of these enigmatic files you’ll see lines of cryptic text which don’t really make a lot of sense. But let’s check it out to see what we can learn.
In my example the file is segmented into two sections:
Each line contains personalization data about the folder that contains my images. It’s using a dynamic linked library called SampleRes.dll which has string resources for each of those images so that Windows Explorer can display the appropriate data when I view the thumbnails. The desktop.ini file is usually used to display custom icons for folders or to restrict a folder from being shared.
Let me show you what I mean:
Normally folders look like inspid cards folded in half with no hints about the media inside.
That’s where desktop.ini comes in. The desktop.ini file is chock full of options that lets you change the folder icon and the tool tip that displays when you hover your cursor over the folder.
Major folder attributes such as:
are all expounded on the Microsoft Developer Network website so I won’t go into that here; I just want you to see that there are a bunch of little settings you can tweak.
Let me show you something:
Right click on any folder in the right pane of Windows Explorer and choose Open Folder Location from the context menu.
Now right click the folder again but this time choose Properties.
Click on over to the Customize tab and click the Change Icon button. You can change it to almost anything. The IconArchive has an abundance of free Windows 7 icons that you can download. After setting an icon, restart Windows Explorer to observe your handiwork.
This slick move furtively updates that desktop.ini file so that the operating system knows what icon to display when you view the folder. All that custom data resides in the desktop.ini file.
Can I delete desktop.ini?
Yes, deleting desktop.ini won’t get you into any trouble. In fact, the operating system will most likely automatically re-spawn the file when you remove it so deleting it isn’t a real fix.
Instead of zapping your desktop.ini files, we should hide them. That way Windows still has what it needs to personalize your folders and you have the peace of mind of seeing a pure directory listing.
In Windows Explorer press Alt + t + o (that’s an oh) and click the View tab.
Plop a check mark in Hide protected operating system files (Recommended), click OK then watch those vexing desktop.ini’s vanish.