Click here for important information about

Duplicate folder names (different case) - NTFS

March 29, 2017 at 10:27:05
Specs: Windows 10

I have a weird situation and not quite sure how to resolve. I have a folder, on Drive D: (NTFS). Inside that folder are two folders with the exact same name.

I didn't think this was possible considering that NTFS was a case-preserving, but case-insensitive file-system yet here I am.

Proof (since I know none of you will believe me):

Screenshot from Windows Explorer:

Screenshot from an Administrative command prompt with dir /A output:

Same as above but with the "/W" wide-format switch so you can see Windows isn't showing any additional characters either in-front or at the end of the directory names:

And last, screen shots from the Explorer "Properties" view for both of the folders. They're the exact same size. They're duplicates!

"Data" folder Properties:

"data" folder Properties:

So my question is:
How can I delete one of those folders? :-)

How all this started was I was trying to back up the parent folder with 7-Zip and 7-Zip kept on failing on me:

See More: Duplicate folder names (different case) - NTFS

March 29, 2017 at 11:17:48
What are your view settings? Do you have File Extensions and Hidden files enabled? Is it possible the newer entry is actually the zip file?

Report •

March 29, 2017 at 11:49:25

Which is why I included the screenshot from the dir output and the folder properties from Explorer (if one of them were a ZIP that would show in the properties or the directory output.)

Knew you guys wouldn't believe me! :-) (Before posting I spent about 2 hours searching Google looking at the answers to everyone else who's posted the same and similar questions.)

Report •

March 29, 2017 at 13:46:52
I believe they look identical but am certain there is a difference. Could be one or other has an extension that the system is hiding. Two identical files in the same place are not allowed to exist. If Windows has somehow allowed this then the system is well screwed up and the best bet is to re-install.

What have you done to try to delete one of them? Do they not delete in the normal way? If not maybe you could copy one somewhere else then delete the main folder. that contains them. There are various programs to delete obstinate files and folders (if that's what they are) before Windows starts. I've sometimes found that trickery such as changing one to a text file can allow a delete.

How do you know which one you want to delete and which one to save?

Always pop back and let us know the outcome - thanks

message edited by Derek

Report •

Related Solutions

March 29, 2017 at 14:33:30
If that were the case then why did 7-Zip complain that they were identical? (See my last screenshot).

I promise you, they *are* identical.

I didn't even notice this until 7-Zip complained.

And, I think I found the problem (and a new conundrum).

I believe this may be related to the Linux Subsystem for Windows.


<blockquote>Linux abstracts file systems operations through the Virtual File System (VFS), which provides both an interface for user mode programs to interact with the file system (through system calls such as open, read, chmod, stat, etc.) and an interface that file systems have to implement. This allows multiple file systems to coexist, providing the same operations and semantics, with VFS giving a single namespace view of all these file systems to the user.</blockquote>


<blockquote>VFS implements the various system calls for file system operations by using a number of data structures such as inodes, directory entries and files, and related callbacks that file systems must implement.</blockquote>

<blockquote>Unlike Linux, Windows file systems are by default case preserving, but not case sensitive. In actuality, Windows and NTFS do support case sensitivity, but this behavior is not enabled by default.</blockquote>


<blockquote>As discussed above, Linux diverges from Windows in several ways for file systems. VolFs must provide support for several Linux features that are not directly supported by Windows.</blockquote>

<blockquote>Case sensitivity is handled by Windows itself. As mentioned earlier, Windows and NTFS actually support case sensitive operations, so VolFs simply requests the Object Manager to treat paths as case sensitive regardless of the global registry key controlling this behavior.</blockquote>

I do remember working in these directories under bash via the Linux Subsystem for Windows.

Now here's my conundrum:

If I attempt to delete the directory in Explorer, I run the (very real) risk of deleting both folders since Explorer doesn't understand case sensitivity.

If I attempt to delete the directory under bash, I run the (very real) risk of deleting both folders since I'm pretty sure the VolFS and filesystem abstraction layer can't deal with two folders of the same name.

I've found a solution, though.

Using 7-Zip I can create a 7z archive of the "Data" folder. Call it "Data-1.7z".

And another archive of just the "data" folder. Call it "Data-2.7z".

Then I can safely delete both "data" folders (they are identical as I proved above).

Then I can safely extract both archives and Windows should create them as one folder.

And today I learned that NTFS <em>is</em> case-sensitive! (It's just not turned-on by default.)

Who knew?

Report •

March 29, 2017 at 14:38:55
OK, if Linux is involved that could make all the difference - I know precious little about Linux. Seems like you are on to it so I hope it works out.

Always pop back and let us know the outcome - thanks

Report •

March 29, 2017 at 14:42:06
The bottom line is, nobody can now assume that Windows can never have two identical folders with the same name any more.

Apparently NTFS has supported this all along, it's just never been enabled by default.

Report •

March 29, 2017 at 15:11:54
Are these two folders different cases - it didn't look like it?

Always pop back and let us know the outcome - thanks

Report •

March 30, 2017 at 01:34:01
Jeez, mate. Can't tell if you're joking or being serious. I'm going to assume you're joking because if you're serious then I've got to ask why are you even here? :rolleyes:

Report •

March 30, 2017 at 06:05:05
Cut the rudeness. We do this for free to try to help others (where possible) in our own free time. We don't do it in order to be criticised by others or to justify our credentials.

Your #6 referred to Windows being able to deal with cases (if set) but the problem you posted seemed to show both folder names in caps. I just wondered if I'd missed something that's all.

Always pop back and let us know the outcome - thanks

Report •

Ask Question