1

I run a 64-bit Windows 10 PC with a single hard disk with two NTFS partitions, C: and D:. Short filenames (8.3) are created in C: but not in D:

  1. How is this possible, and
  2. Can I enable short filenames in D: too?
3
  • Do you mean when you type dir /x on D:, there are no 8.3 names? – cup Apr 8 at 19:17
  • Yes, something like that. But this is quite an old question. I have solved it (fortunately!) since then. There's a flag in the registry for a drive to accept short names. For drive C: it was set by default, but not for drive D:, not. (Same disk, different partition! Weird, eh?) Anyway, after I turned it ON I can see and use short names in D: too. It is very essential for me, because --as an old timer-- I work a lot in MSDOS! :) – Apostolos Apr 10 at 18:59
  • I use old compilers etc too. They only accept 8.3 file and directory names. I normally have to do a dir/x to find out what the actual names is. – cup Apr 10 at 20:38
5

The global setting for 8.3 name creation is controlled by the key HKLM\System\CurrentControlSet\Control\FileSystem\NtfsDisable8dot3NameCreation. The default value is 2 which means allowing each volume to have its own local 8.3 name creation setting. The available settings for that key are:

  • 0: Enables 8dot3 name creation for all volumes on the system.
  • 1: Disables 8dot3 name creation for all volumes on the system.
  • 2: Sets 8dot3 name creation on a per volume basis.
  • 3: Disables 8dot3 name creation for all volumes except the system volume.

When the value is 2, the setting for each volume can be get/set by the fsutil 8dot3name command

C:\WINDOWS\system32>fsutil 8dot3name query
The registry state is: 2 (Per volume setting - the default).

C:\WINDOWS\system32>fsutil 8dot3name query c:
The volume state is: 0 (8dot3 name creation is enabled).
The registry state is: 2 (Per volume setting - the default).

Based on the above settings, 8dot3 name creation is enabled on c:

How is this possible

The setting doesn't apply to all partitions in the whole system as said above. That means someone disabled 8.3 name creation in D:. With fsutil you can even add/remove 8.3 names for a specific file with fsutil file setshortname/fsutil 8dot3name strip regardless of the system/volume setting so another possible but less likely solution is that all the 8.3 names have been deleted and new files haven't been added to the volume

Since Windows 8 and Windows Server 2012 newly formatted volumes will have 8.3 name generation disabled by default. This is probably the situation in your PC

In fact, recent versions of Windows Server don’t even enable 8.3 naming when you format new data volumes.

https://docs.microsoft.com/en-us/archive/blogs/josebda/windows-server-2012-file-server-tip-disable-8-3-naming-and-strip-those-short-names-too


Can I enable short filenames in D: too?

Yes, of course. To enable the setting on D: run

fsutil 8dot3name set D: 0

and to disable it

fsutil 8dot3name set D: 1

Related:

5
  • 'phuclv', thank you for your answer, but maybe you missed the answer I have already given, in which I found the solution and you have just repeated it here. Then you wonder why I don't accept answers … – Apostolos Nov 27 '19 at 19:37
  • @Apostolos no, you found the key but you didn't really answer any of your questions and still wondered "How one partition has short names and the other not? The registry key applies to all NTFS file systems!", "How is this possible, and Can I enable short filenames in D: too?". Because the real answer is to use fsutil and not the global registry key – phuclv Nov 28 '19 at 0:06
  • please read through my answer instead of just looking at the first sentence and thought that it's what you answered – phuclv Nov 28 '19 at 0:08
  • Well, I have provided the solution and that's a closed case as far as the specific question is concerned, for me and others with the same problem. Whatever else is proposed is outside the question, except of course if it's an additional solution, which is not the case here. – Apostolos Nov 30 '19 at 11:18
  • @Apostolos which specific question have you answered? "How comes that short filenames (8.3) are created in one partition and not in another of the same disk?" or "Can I enable short filenames in D: too?" – phuclv Nov 30 '19 at 11:22
-1

Meanwhile, I found the right question to ask in Bing, which led me to the solution from http://omtool.com/documentation/HPCR/v1.2.0/ServerHelp/Enabling_8.3_name_creation.htm:

Go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem in the registry and set NtfsDisable8dot3NameCreation to 0. (Default is 2). I tried it and it works.

But the first question still holds: How one partition has short names and the other not? The registry key applies to all NTFS file systems!

So, I don't delete my question for another also reason: other people might have the same question and cannot find the solution in the Web, as I couldn't myself.

3
  • The registry key applies to all NTFS file systems! it doesn't when the setting value is 2 or 3 – phuclv Nov 28 '19 at 1:53
  • Right. And the question is about NTFS file systems! – Apostolos Nov 30 '19 at 11:20
  • I don't get that. You didn't answer your own questions above: How is this possible, and Can I enable short filenames in D: too? How does this show that separate settings for C: and D: are possible and how to enable that on D:? – phuclv Nov 30 '19 at 11:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.