如果您最近在Windows中修改过(Windows)文件资源管理器的(File Explorer's)设置,您可能会惊讶地发现在您的计算机或设备(computer or device)上的所有文件夹中都有一些名为desktop.ini的文件。桌面(Desktop)上的两个desktop.ini文件是最引人注目的,并引发了很多问题:这些文件是什么,为什么桌面(Desktop)上有两个?他们的目的是什么?你如何摆脱它们?在本指南中,我们旨在阐明这些问题,因此请继续阅读以找到您寻求的答案:
什么是 desktop.ini 文件?
desktop.ini是一个文件,用于确定Windows显示文件夹的方式。虽然通常是隐藏的,但这些文件可以在您计算机上的任何文件夹中找到,并且它们包含与该文件夹相关的信息和设置(information and settings),例如用于该文件夹的图标及其本地化名称。
每当您对文件夹进行某些更改时,Windows都会自动在该文件夹内创建一个desktop.ini文件。对包含文件夹(containing folder)的配置和布局设置的任何更改都保存在desktop.ini文件中,并且没有任何设置可以更改此行为,因为这就是Windows的编程方式。如果您右键单击或按住任何desktop.ini文件,然后单击或点按Properties,您会看到“文件类型("Type) ”(of file")字段表明这一点,并显示Configuration settings。
虽然普通用户不需要与desktop.ini文件进行交互,但您可以在(desktop.ini)记事本(Notepad)中打开它们以查看其内容。我们自定义了一个新创建的文件夹的图标,当我们打开它时,这是该文件夹中desktop.ini文件的内容。
为什么我的桌面显示两个(Desktop show two)desktop.ini 文件?
您现在应该对desktop.ini(desktop.ini)文件是什么有了基本的了解。但是,这仍然不能解释为什么大多数文件夹只包含一个desktop.ini文件,而您的桌面(Desktop)却有两个。为了弄清楚这一点,我们需要解释一些关于你的桌面(Desktop)的事情。
首先,桌面(Desktop)是每个用户帐户(user account)唯一的文件夹(folder unique),只能由该用户或管理员访问。此文件夹位于以下路径:“C:UsersYour UsernameDesktop”
其次,有一个公共桌面(Public Desktop)文件夹,您计算机(computer use)上的所有用户都会自动使用它。它位于文件夹“C:UsersPublic”中,其中包含每个用户的标准("C:UsersPublic")桌面(Desktop)上可用的项目。
当您启动计算机或设备时, (computer or device)Windows显示的桌面(Desktop)是用户的桌面(Desktop)和公共桌面(Public Desktop)文件夹的组合。您会看到两个desktop.ini文件,因为两个文件夹组合在一起创建了您的Desktop,每个文件夹都有自己的desktop.ini:一个用于您的用户帐户(user account),一个用于公共桌面。(Public Desktop.)
为什么我突然看到 desktop.ini 文件?
Desktop.ini文件并不总是可见的,而且大多数Windows用户都看不到它们。这是因为它们是受保护的操作系统文件,因此默认情况下,Windows会隐藏这些文件,并建议用户也将它们隐藏。您(或使用您的计算机的人)必须将Windows设置为同时显示隐藏文件和受保护文件,这就是为什么您似乎随处可见desktop.ini文件的原因。(desktop.ini)要让Windows显示这些类型的文件,您首先需要打开文件资源管理器选项窗口(File Explorer Options window)。一种方法是使用任务栏中的搜索字段(search field)输入关键字“文件夹选项”("folder options")并单击或点击“文件资源管理器选项("File Explorer Options)”。
然后,在“查看”选项卡的“(View)高级设置(Advanced settings)”部分中,选中“显示隐藏的文件、文件夹或驱动器”("Show hidden files, folders, or drives")并取消选中“隐藏受保护的操作系统文件(推荐)("Hide protected operating system files (Recommended))”。
如果您错误地处理操作系统文件并要求您确认选择,则会弹出警告,让您知道风险。(Warning)单击(Click)或点击是(Yes)。
通过单击或点击确定(OK)再次确认您的选择(choice one),desktop.ini文件立即在您的(desktop.ini)Windows 计算机或设备(Windows computer or device)上可见。
提示:(TIP:)如果您想了解可以从“文件资源管理器选项”("File Explorer Options")窗口进行的其他调整,请查看:在Windows中改进(Windows)文件资源管理器或 Windows 资源管理器(File Explorer or Windows Explorer)的 15 种方法(所有版本)
如何摆脱 desktop.ini 文件?我可以删除它们吗?
不建议删除desktop.ini文件,即使它无害。由于它们的唯一作用是存储一些可视化自定义选项,因此删除它们不会损坏您的Windows 安装(Windows installation)。此操作的唯一后果是它们的文件夹在Windows显示时失去其自定义外观(custom appearance),但您可以再次自定义它,并且desktop.ini再次出现。如果您不想在计算机上的任何位置看到Desktop.ini文件,最好隐藏受Windows保护的系统文件。为此,请打开文件资源管理器选项窗口(File Explorer Options window)。最舒服的方法是使用从任务栏中搜索字段(search field)以输入关键字“文件夹选项”("folder options"),然后单击或点击“文件资源管理器选项("File Explorer Options)”。然后,转到“查看”(View)选项卡,您可以在其中启用“隐藏受保护的操作系统文件(推荐)”("Hide protected operating system files (Recommended)")设置或选择到“高级设置(Advanced settings)”下的“不显示隐藏的文件、文件夹或驱动器”("Don't show hidden files, folders, or drives")。完成后,单击或点击OK。
desktop.ini文件现在从视图中隐藏,不再打扰您。要了解有关在Windows中使用隐藏文件和文件夹的更多信息,请阅读:如何查看Windows 10中的所有隐藏文件和文件夹。
你对你的 desktop.ini 文件做了什么?
现在我们知道了desktop.ini文件是什么,以及为什么我们的(desktop.ini)Desktop上有两个文件。阅读本指南后,请随时与我们分享您是否想让它们可见。你对他们做了什么?您(Did)是否删除了它们,或者您是否遵循我们的建议并选择将它们隐藏起来?请在下面的评论中告诉我们。
Desktop.ini - What is this file? Why are there two of them on my desktop?
If yoυ've reсently tinkered with File Explorer's settings in Windows, you might be surprised to discover some files called desktop.ini in all the folders on your computer or device. The two desktop.ini files present on your Desktop are the most noticeable and raise a lot of questions: What are these files and why are there two of them on your Desktop? What purpose do they serve? How do you get rid of them? In this guide, we aim to shed some light on these matters, so read on to find the answers you seek:
What are desktop.ini files?
A desktop.ini is a file that determines the way a folder is displayed by Windows. While usually hidden, these files can be found in any folder, anywhere on your computer, and they contain information and settings pertaining to that folder, like the icon used for it and its localized name.
Whenever you make certain changes to a folder, Windows automatically creates a desktop.ini file inside that folder. Any changes to the configuration and the layout settings of the containing folder are saved in the desktop.ini file, and there are no settings to change this behavior, as this is how Windows is programmed to function. If you right-click or press-and-hold on any desktop.ini file, and then click or tap Properties, you can see the "Type of file" field indicates this, displaying Configuration settings.
While regular users do not need to interact with desktop.ini files, you can open them in Notepad to take a look at their contents. We customized the icon of a newly created folder and, when we opened it, this was the content of the desktop.ini file from that folder.
Why does my Desktop show two desktop.ini files?
You should now have a basic understanding of what the desktop.ini files are. However, this still does not explain why most folders only contain one desktop.ini file, while your Desktop has two of them. To get to the bottom of this, we need to explain some things about your Desktop.
First of all, the Desktop is a folder unique to every user account, that can only be accessed by that user or by an administrator. This folder is located at the following path: "C:UsersYour UsernameDesktop"
Secondly, there is a Public Desktop folder that all the users on your computer use automatically. It is located in the folder "C:UsersPublic" and it holds the items that are available on every user's standard Desktop.
The Desktop displayed by Windows when you start your computer or device is a combination of your user's Desktop and the Public Desktop folder. You see two desktop.ini files because two folders combine to create your Desktop, each with its own desktop.ini: one for your user account and one for the Public Desktop.
Why do I suddenly see desktop.ini files?
Desktop.ini files are not always visible, and most Windows users never see them. That is because they are protected operating system files, so, by default, Windows hides these files and recommends that users keep them hidden too. You (or someone using your computer) must have set Windows to display both hidden and protected files, and that is why you seem to have desktop.ini files showing up everywhere. To make Windows display these types of files, you first need to open the File Explorer Options window. One way to do that is to use the search field from the taskbar to enter the keywords "folder options" and click or tap "File Explorer Options."
Then, in the Advanced settings section of the View tab, check "Show hidden files, folders, or drives" and uncheck "Hide protected operating system files (Recommended)."
A Warning pops up letting you know of the risks if you mishandle operating system files and asking you to confirm your choice. Click or tap on Yes.
Confirm your choice one more time by clicking or tapping OK, and desktop.ini files become instantly visible on your Windows computer or device.
TIP: If you want to read about other tweaks you can make from the "File Explorer Options" window, check out: 15 ways to improve File Explorer or Windows Explorer in Windows (all versions)
How do I get rid of the desktop.ini files? Can I delete them?
Deleting the desktop.ini files is not recommended, even though it is not harmful. Since their only role is to store some visual customization options, deleting them does not damage your Windows installation. The only consequence of this action is that their folder loses its custom appearance when displayed by Windows, but you can customize it once more, and the desktop.ini shows up again. If you would rather not see Desktop.ini files anywhere on your computer, it is best to hide the system files that are protected by Windows. To do that, open the File Explorer Options window. The most comfortable way is to use the search field from the taskbar to enter the keywords "folder options" and click or tap "File Explorer Options." Then, go to the View tab, where you can either enable the "Hide protected operating system files (Recommended)" setting or choose to "Don't show hidden files, folders, or drives" under Advanced settings. When done, click or tap OK.
The desktop.ini files are now hidden from view, and don't bother you anymore. To learn more about working with hidden files and folders in Windows, read: How to view all hidden files and folders in Windows 10.
What did you do with your desktop.ini files?
Now we know what desktop.ini files are and why there are two of them on our Desktop. After reading this guide, do not hesitate to share with us whether you want to keep them visible or not. What did you do with them? Did you delete them, or did you follow our recommendations and chose to hide them from view? Let us know in the comments below.