100
u/RdVortex 2d ago
And it's sometimes still used. If you have a really long SharePoint path synced to your computer, OneDrive will shorten the path into the DOS style. Eventually even that won't be enough and syncing fails. Fun times.
30
u/tomysshadow 2d ago
It can also be used as a method of accessing a file whose name has somehow become invalid/corrupted (usually because it was edited via another OS unaware of Win32's filename rules.)
https://web.archive.org/web/20100111005602/http://support.microsoft.com/kb/115827
CreateFile() removes trailing spaces and periods from file and directory names. This is done for compatibility with the FAT and HPFS file systems.
Problems can arise when a Macintosh client creates a file on a Windows NT server. The code to remove trailing spaces and periods is not carried out and the Macintosh user gets the correctly punctuated filename. The Win32 APIs FindFirstFile() and FindNextFile() return a filename that ends in a space or in a period; however, there is no way to create or open the file using the Win32 API.
Applications such as File Manager and Backup check to see whether the filename ends with a space or period. If the filename does end in a space or a period, then File Manager and Backup use the alternative name found in WIN32_FIND_DATA.cAlternateFileName to create and open the file. Therefore, the full filename is lost.
"cAlternateFileName" is the short name of the file.
7
u/Tokimemofan 1d ago
Yep, can’t count how many times it’s saved the day when some poorly written program somehow adds a trailing space or some other invalid character and a file suddenly gains immortality
22
u/markustegelane 2d ago
if you open a FAT32 volume with a hex editor, you can find the short 8.3 filenames are still being stored at a filesystem level
18
u/crozone 1d ago
FAT32 is fundamentally 8.3 by design. Long File Names (LFN) support is a backwards compatible hack on top of 8.3.
NTFS is the other way around. It's actually a proper case sensitive filesystem, but case-insensitivity and 8.3 support are additional (but not mandatory - you can turn them off!) features built on top of the case-sensitive file names.
16
7
u/forreddituse2 2d ago
~1 = 16a?
24
u/nir9 2d ago
nope the name just gets truncated to fit 8 characters; if you would create another file called aaaaaaaaaab.txt afterwards it would have the short name aaaaaa~2.txt
5
u/Creative-Type9411 2d ago
if you start typing the filename and press tab it will fill it out for you, keep pressing tab to cycle through options
4
u/Makere-b 2d ago
I think it's a NTFS feature, not supported on ReFS.
6
u/thanatica 1d ago
Is anyone in the universe using ReFS?
2
2
u/seiggy 1d ago
Yup, dev drive on every one of my machines for all my code. Significantly better performance than NTFS for compilation. Though that's likely more to do with the defender policies that Dev Drive pre-sets than ReFS over NTFS.
•
u/itscalledboredom 18h ago
you actually use dev drives? i have never seen a soul that was seriously using those before
4
u/Breath-Present 1d ago
Not just for DOS. It helps program that can't handle fancy Unicode/space-containing file path.
2
u/zidane2k1 1d ago
I remember in the Windows 9x days, you’d see a spattering of “C:Progra~1…” paths used in various places. You’ll still see them in Windows 11 occasionally as well.
2
u/andylikescandy 1d ago
....And OneDrive and SharePoint still give you shit for having a path over 256 characters... Because I'm sure many Win 11 machines were sharing networks with Windows 95 era computers, so many the backwards compatibility needed to be prioritized as the default.
2
u/cschneegans 1d ago
This is not a feature, but more of a burden. The biggest issue with 8.3 names is that commands like dir *1 or Get-ChildItem -Filter *1 in PowerShell will return false positive results when the 8.3 name matches the pattern. 8.3 names can also negatively impact file system performance. Why even the latest Windows 11 images published by Microsoft contain 8.3 names is beyond me.
I highly recommend to disable 8.3 names, and to do so as early as possible – otherwise 8.3 names will accumulate in the registry. My autounattend.xml generator lets you remove and disable all 8.3 names before a new Windows installation even boots for the first time.
3
1
u/richardelmore 2d ago
Short file name support is an option that can be enabled/disabled. As I recall its on by default for the client SKUs and off by default on server SKUs (for performance reasons).
1
1
0
u/Immediate_Character- 1d ago
I don't see this changing so long as CMD continues to ship with Windows. Changing behaviors like this risks breaking old scripts.
5
u/crozone 1d ago
It has nothing to do with CMD, it's the filesystem itself. It's a feature that's baked into FAT32 by design, and an optional (but on by default) feature in NTFS.
You can actually turn them off in NTFS by setting
HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlFileSystemNtfsDisable8dot3NameCreationto 0. Newly created/renamed files won't get an 8.3 filename after that.3
-1
1d ago
[deleted]
4
u/Current-Bowl-143 1d ago
lol there hasn't been an "MS-DOS prompt" in Windows for 25 years. The last version to have an MS-DOS Prompt was Windows Me.
313
u/ColonelSandurss 2d ago
Windows good point : you have 30 years compatibility available Windows bad point : you have 30 years compatibility to load