DOS was originally restricted to 8.3 filenames; 1-8 characters for the name, 1-3 characters for an optional extension. Windows came along with Long File Names
(LFN’s), supporting up to 255 characters. Microsoft also came up with a scheme so DOS programs could access those LFN files: Short File Names
When a LFN file like “Microsoft1.doc” is created, Windows also creates a SFN for that file: “MICROS~1.DOC”. The first 6 characters of the LFN, followed by a tilde, then a digit. When another LFN file is created with the same first 6 characters, for instance “Microsoft3.doc”, the digit is incremented: “MICROS~2.DOC”. That digit goes up to 4, a fifth LFN file, like “Microsoft2.doc” will become “MI1BC3~1.DOC”. The first two characters, a 4 digit hexadecimal CRC of the LFN, a tilde and a digit.
vDos doesn’t support LFN/SFN, moreover these files are hidden to DOS (applications).
- Only a few vDos users ever requested such support. When asked why, none was actually able to come with a general, practical, non-fictional reason or case.
- LFN’s are used/supported by only a few (mainly utility) DOS programs. One specific version of a Zip/Unzip program, ditto file manager, and some other examples, just silly to be started in vDos. You have 32/64-bit genuine Windows program for that.
- The whole idea of LFN’s is to get more descriptive filenames. The concept of SFN’s however results in less descriptive, even confusing or cryptic filenames. DOS programs intended to run in vDos cannot create LFN’s, nor SFN’s (only Windows can do that). So why should they be able to open a LFN file by means of a SFN. That LFN file is obviously created by a non-DOS (Windows) program.
- SFN’s are not ‘fool proof’. If “Microsoft1.doc” (SFN: “MICROS~1.DOC”) is copied to another folder, already containing that SFN (LFN: “Micros-whatever and case-.doc”), “Microsoft1.doc” will become SFN “MICROS~2.DOC”. Can it get more confusing or misleading, with SFN’s? Yes it sure can, just do some experimenting yourself.
- SFN’s aren’t always created by Windows, some server editions don’t by default. External filesystems like on a NAS might suffer the same ‘problem’.
- Microsoft already announced some time ago SFN’s were to be dropped in future Windows versions. It’s a mystery why for instance desktop Windows 64-bit still generates SFN’s, while it doesn’t support DOS programs at all.
- Generating a SFN for a LFN is a burden for Windows. The SFN has to be unique within the containing folder. So Windows will start off with “MICROS~1.DOC”, then has to cycle through possible SFN’s, examining the complete folder listing over and over. Until it comes up with an new unique SFN. You should consider to turn off Windows generating SFN’s!
Note: There is a ‘backdoor’ in vDos to open a LFN/SFN file, while they are hidden in directory listings. Just supply the SFN, for instance “MICROS~2.DOC”. With SFN support, you also would have to know what that SFN actually refers to (“Microsoft1.doc”…?).