What is the Windows desktop.ini file and can I delete it?

Updated: 01/05/2018 by Computer Hope
Desktop.ini file

The desktop.ini file is a hidden file that stores information about the arrangement of a Windows folder. Essentially, if the layout or settings for a folder are changed, a desktop.ini file is automatically generated to save those changes.

Can it be deleted?

The desktop.ini file can technically be deleted from any directory, although it's not advised. The file saves settings associated with the folder where it is contained, deleting it changes the settings back to default. For example, if you changed the icon of a folder, then deleted the desktop.ini file, the icon would revert to what it was before.


To delete a desktop.ini file, right-click the file icon and select Delete from the drop-down menu. You can also select the desktop.ini file and press Del on your keyboard.

Can I stop it from being generated?

The Windows operating system automatically generates a desktop.ini file upon changes to a folder. This automatic generation cannot be turned off, as it is a part of the operating system programming. Although you may delete any desktop.ini file, if a change is made to the folder's layout, it will be regenerated again automatically. Since deleting system files is not generally advised, a better option is usually to hide system files instead.

Is this file a virus?

No, this file is not a virus. However, there are a few viruses that exploit the capabilities of the desktop.ini file. If you're concerned about this file being infected, scan it with an antivirus program.