They’re Windows being helpful.
Your name isn’t Sisyphus, is it? Just like Sisyphus is doomed to push a rock up a hill for all eternity, you’ll be deleting desktop.ini files forever. They’ll just keep coming back.
To understand why, we’ll look at what desktop.ini files do.
desktop.ini files
Desktop.ini files are hidden files used by Windows to store folder display settings. Deleting them is futile; they’ll just come back when folder settings change. To avoid seeing them, adjust Windows File Explorer settings to hide hidden and protected system files. Ignoring them is by far the simplest solution.
Desktop.ini
A desktop.ini file is nothing more than a text file that contains information about how Windows should display the folder in which it’s located. Here’s a random example:
[.ShellClassInfo] LocalizedResourceName=@%SystemRoot%\system32\shell32.dll,-21769 IconResource=%SystemRoot%\system32\imageres.dll,-183
The files can contain several settings. A simple example is “IconResource”, shown above. It indicates the icon that should be displayed when the folder is shown in Windows File Explorer. Change that icon (via Folder Properties), and this line is updated to reflect your new choice.
Why you might not see them at all
Desktop.ini files are hidden by default. The only way to see them is to “Show hidden files, folders, and drives” and turn off the “Hide protected operating system files” in Windows File Explorer’s settings.
(Or use the “/A:H” switch with the DIR command if you’re looking within Command Prompt.)
Once those are set, you’ll see desktop.ini files in assorted locations.
Why you might see two
You’ll see two desktop.ini files on the desktop.
Your computer’s desktop is a combination of two folders. In the example above, the desktop shows information from:
- C:\Users\leon\Desktop
and
- C:\Users\Public\Desktop
All users of the computer are shown items from the Public folder as well as their own.
But they’re still two folders. Two folders means two desktop.ini files.
Delete all you want; we’ll make more
It’s generally safe to delete desktop.ini files. But it’s kinda pointless.
Two things will happen:
- The settings defined within the desktop.ini file will be reset to default values.
- The next time a setting changes, the desktop.ini file will be recreated.
Resistance is, as they say, futile.
Suddenly appearing desktop.ini files
If you’ve never seen desktop.ini files and suddenly see them everywhere, then the “hide” options in Windows File Explorer have been changed to allow them to be seen.
If you have desktop.ini files displayed in some places but now see one in a new place, then some kind of setting for that folder has been applied, and a desktop.ini was created to hold it.
Do this
Delete ’em if you like, but desktop.ini files will come back. My advice is to ignore them if you see them. If you’re so inclined, set Windows File Explorer options to hide them from view.
Don’t hide this: subscribe to Confident Computing! Less frustration and more confidence, solutions, answers, and tips in your inbox every week.