8.3 Short File Names: Why PROGRA~1 Still Appears


The 8.3 short file names rule dates back to the first version of DOS: up to eight characters for the name, a dot, and up to three characters for the extension. Every FAT volume used that format, and every program written before long file names assumed it. NTFS has kept generating the same kind of alias ever since, purely to stay compatible.

That is why PROGRA~1 still turns up in old installers, log files and error dialogs on a brand-new drive. The short name is a second directory entry that Windows creates beside the real one whenever a long name cannot be written in 8.3 form.

Where the Short Name Comes From

NTFS keeps the visible long name in a file-name attribute inside the file's record. When short-name creation is enabled and the long name does not already fit the DOS rules, the file system adds a second attribute holding an uppercase alias. The rules are strict: no spaces, no characters outside a limited ASCII set, one dot at most, and a maximum of eight plus three characters.

The generation is mechanical rather than clever. NTFS strips spaces and invalid characters, takes the first six usable characters of the long name, and appends a tilde plus a number. "Program Files" becomes PROGRA~1, and a long report name becomes something like QUARTA~1.DOC.

A name that already fits is left alone, which is why many legacy paths look normal while only the long ones show the tilde.

How Collisions Get Numbered

Short names must be unique inside a directory, and files and subfolders share the same namespace. The first object that needs an alias in a folder receives ~1, the next ~2, and so on. Ten objects later the base has to shrink, so the tenth becomes PROGRA~10 rather than PROGRA~2 with an extra digit.

Numbers are recycled. Delete PROGRA~1 and the next new long name in that folder can take the freed ~1, even though it has nothing to do with the original. Any stored reference now points at a different object, so never keep a short path in a script or registry value.

The assignment also depends on creation order: copy the same folder to two machines and the files can receive different numbers, so a short path is not portable even when the content is identical.

Registry and Per-Volume Settings

Two different mechanisms control the behavior, and they are easy to confuse. The registry value NtfsDisable8dot3NameCreation under HKLM\SYSTEM\CurrentControlSet\Control\FileSystem is a machine-wide policy with four states: 0 creates short names on every volume, 1 disables them everywhere, 2 defers to each volume, and 3 disables them everywhere except the system volume. Modern Windows installations default to 2; older releases defaulted to 0.

The per-volume state is a flag stored on the volume itself, so it travels with the disk rather than the machine. The flag is set with the 8dot3name command in fsutil, a Windows built-in utility that is separate from Qiling Disk Master; 0 enables generation and 1 disables it for that drive. With the registry value set to 2, this flag decides the outcome; with 1 or 3, the registry already overrides it.

Changing either setting affects only new entries. Files that already own an alias keep it, and the folder listing does not shrink. Removing the existing names is a separate operation that cannot be undone: the strip option deletes every alias on the volume, refuses to run on the system volume, and warns that some programs may stop working. Run it only on a volume you can restore.

Why Some Installers Still Need It

Older setup programs were built for a world without spaces in paths. Ask such a program to install under C:\Program Files and it may request the short form of a path, then hand that string to a parser that splits on spaces. As long as the volume generates aliases, the trick works and the installer completes. Disable creation and the same call returns the long path, the string splits in the wrong place, and setup fails with a file-not-found error that names a path you never typed.

Licence managers, VB6 runtime packages, driver utilities and antivirus updaters from the same era behave the same way. Some also use the short form to shorten a path that would otherwise cross the old 260-character limit, which is a second, unrelated reason the alias still has value.

That legacy dependence is exactly why state 3 exists. It keeps short names on the system volume, where the boot-time and compatibility code lives, while allowing every data volume to stop paying for them. On a volume holding millions of small files, the saved metadata is real: each alias occupies space in a record and in the directory index.

Verifying a Volume After the Change

After you change the policy, confirm that the volume still mounts, existing folders open, and no application lost its expected path. A file system check proves the volume is healthy before you blame the setting.

Step 1. Right-click the NTFS partition in Qiling Disk Master and open Advanced, then choose Check File System.

right-click the NTFS partition and open Check File System

Step 2. Tick the repair options and click Proceed to start the check.

select the repair options and click Proceed

Step 3. Wait for the check to finish and review the result before you run any legacy installer.

review the file system check result

FAQ

Do I need 8.3 names on a modern drive?

For Windows itself, rarely. Keep them on the system volume for compatibility, and disable them on data volumes when a folder holds a very large number of small files.

Can I turn short names back on after disabling them?

Yes. Set the registry value to 0 or the per-volume flag to 0, and new files will receive aliases again. Existing files are unaffected, because they never had an alias to restore.

Why did a short name change after I deleted files?

Numbers are reused. Deleting an object frees its alias, and the next new long name in that folder can take the same number, which breaks any stored reference to the old short path.

Related Articles


Is this information helpful?     

What can we do to improve this information? (Optional)
Refresh Please enter the verification code!


QilingTech uses cookies to ensure you get the best experience on our website.  Learn more  Got it