What Is the Windows Desktop.ini File and Can I Delete It?

by Jake Harfield

Some people assume the Desktop.ini file is a virus or malware because it sometimes appears suddenly on their PC. Luckily, this isn’t the case, but if you’re wondering what Windows’ Desktop.ini file is, you’ve come to the right place. 

In this article, we’ll cover what the Desktop.ini file is, how you can use it, and whether it’s safe to delete.

Table of Contents

    What Is the Desktop.ini File?

    The Desktop.ini file is a hidden configuration file found in every folder on Microsoft Windows (including Vista and Windows 10/11). Each Desktop.ini file contains the configuration settings for that folder.

    The Desktop.ini file is not visible by default as it’s a protected operating system file. If it’s suddenly appearing on your PC, you or another user have changed your folder settings to display hidden folders.

    Desktop.ini files are created when specific changes are made to a folder, such as giving it a custom icon or specific sharing settings.

    How Can I See the Desktop.ini File?

    Desktop.ini files are hidden and protected, so the average user will never encounter them. To make them visible in your folder:  

    1. Open File Explorer.
    2. Select the View tab. 
    1. Select Options
    1. Select the View tab. 
    1. Scroll down and check Show hidden files, folders, and drives
    2. Scroll down further and uncheck Hide protected operating system files (Recommended). Select Yes to accept the warning message.

    The Desktop.ini file should now appear in any folder where you have altered its configuration or layout. 

    Can I Delete the Desktop.ini File?

    Deleting the Desktop.ini file simply reverts a folder to its default settings. So yes, you can delete the Desktop.ini file. However, if you want to keep the changes you’ve made to a folder’s settings, you can simply hide the Desktop.ini file by reversing the steps we showed you in the previous section.

    How to Customize a Folder With the Desktop.ini File

    Customizing a Windows folder with the Desktop.ini file is simple. First, you need to hide the folder and label it as an important system folder so that Windows grants it the required read-only attribute that enables special behavior from the Desktop.ini file.

    To do so:

    1. Open or create the folder you would like to customize.
    2. Open the Start menu, then type Command Prompt and select it.
    1. In Command Prompt, type attrib +s “FolderName”. For example: attrib +s “C:\Test\TestFolder” and hit Enter.

    Next, you need to create and edit the Desktop.ini file. To do so, you need to create a text file in the folder you would like to customize.

    1. At the top of the folder window, ensure that File name extensions are turned on.
    1. Right-click in your folder and select New > Text Document.
    1. Name it Desktop.ini and press Enter. A message box will appear asking you to check the file extension. Click Yes.
    1. Right-click the file you’ve just created and select Properties. Next to Attributes, tick Hidden and Read-only.
    1. Press OK.
    2. Double-click the file to open it in Notepad. Click File > Save As.
    1. For certain phrases/formatting to be picked up, the file needs to be saved in Unicode. At the bottom of the window, by Encoding, ensure that UTF-8 is selected.

    The Desktop.ini file is now ready to be populated with configuration settings. Here are some of the following settings you can use to customize your folder:

    For example, here’s a test folder I created with a custom icon and InfoTip:

    And here’s the Desktop.ini file used to customize it: 

    That’s All, Folks

    Now you know what the Desktop.ini file is and how you can use it to add custom folder options. While it isn’t particularly useful for most users, it’s always good to know that a mysterious hidden folder isn’t malware evading your antivirus.

    Exit mobile version