Certain files/folders within Windows have attributes assigned to them by default that hides them from Windows/File Explorer unless the relevant settings are changed to display these types of files/folders from within the Folder Options dialog. What isn't immediately obvious, however, is how Explorer would handle a situation whereby a user creates a folder with a duplicate name in a location that already contains a hidden folder - does it simply display an error message, or allow a folder to be created with the same name?

2 Answers 2


Duplicate files and folders are not permitted. You also cannot have a file and folder with the same name. Whether the files or folders have the hidden attribute set makes no difference.

Files and folders with the hidden attribute are not hidden from Windows explorer. It is fully aware of them and in fact makes use of them. Explorer examines the hidden "desktop.ini" file in some folders for instructions on how to display it's name and icon. Other software too is aware of hidden files and folders and can make full use of them. In fact software wouldn't even be aware they were hidden unless it checked for the attribute, which most software does not. By default Explorer will not display hidden files and folders to the user but aside from that it has little interest in the attribute. It isn't in any way restricted by it.

The prohibition against duplicate files and folders is enforced by the file system, not Explorer. When the user attempts to create a file or folder that already exists I doubt that Explorer is initially even aware of this. It submits the request to the file system which then determines that it already exists and returns an error to Explorer which then informs the user. Whether or not a file or folder has the hidden attribute is not a factor.

Duplicate files or folders would cause some serious problems for software and the file system itself. How would software distinguish between them? For that reason the file system enforces the prohibition itself. Explorer, like any software, must abide by the file system's rules.

  • Nice answer... what is confusing to people (sometimes) is that on UNIXy operating systems.. the file DOES have a different name (starting with a dot).. Apr 3, 2021 at 14:58

I have just done a quick test.

  • Created a new folder, gave it a name, then set it to be hidden.
  • Created another folder. Tried to change its name to the same as the one created on the previous step. The window on the image below appeared:


Conclusion: Even if a directory is hidden, you are not allowed to create another folder with the same name. The reason is that Windows filenames are case sensitive, which means that abC is the same as AbC, ABC and abc regardless of how you write it. On Linux, you could create a new folder which is called ABC, then create other folders named Abc, abc and abC. They will all be valid. But hidden means only hidden, not gone.

  • On Linux, it IS a different filename. On windows, only an NTFS flag is preventing windows from allowing a duplicate name (only differing by case) like Linux does. It used to be a registry setting only but the file system was extended to support this because of WSL. Apr 3, 2021 at 14:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .