Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
8.3 filename
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Overview== 8.3 filenames are limited to at most eight characters (after any directory specifier), followed optionally by a [[filename extension]] consisting of a [[full stop|period]] {{code|.}} and at most three further characters. For systems that only support 8.3 filenames, excess characters are ignored. If a file name has no extension, a trailing {{code|.}} has no significance (that is, {{code|myfile}} and {{code|myfile.}} are equivalent). Furthermore, file and [[directory (file systems)|directory]] names are [[uppercase]] in this system, even though systems that use the 8.3 standard are usually [[case sensitivity|case-insensitive]] (making {{code|CamelCap.tpu}} equivalent to the name {{code|CAMELCAP.TPU}}). However, on non-8.3 [[operating system]]s (such as almost any modern operating system) accessing 8.3 file systems (including DOS-formatted [[floppy disk]]s, but also including some modern memory cards and networked file systems), the underlying system may alter filenames internally to preserve [[case sensitivity|case]] and avoid truncating letters in the names, for example in the case of [[VFAT]]. ===VFAT and computer-generated 8.3 filenames=== [[VFAT]], a variant of FAT with an extended directory format, was introduced in [[Windows 95]] and [[Windows NT]] 3.5. It allowed mixed-case [[Unicode]] [[long filename]]s (LFNs) in addition to classic 8.3 names by using multiple [[design of the FAT file system#Directory table|32-byte directory entry records]] for long filenames (in such a way that old 8.3 system software will only recognize one as the valid directory entry). To maintain backward-compatibility with legacy applications (on [[DOS]] and [[Windows 3.1]]), on FAT and VFAT filesystems, the operating system automatically generates an 8.3 filename for every LFN, through which the file can [also] be opened, renamed, or deleted, although the generated name (e.g. {{code|OVI3KV~N}}) may show little similarity to the original. The generation of 8.3 filenames on NTFS filesystems can be turned off system-wide (with risks).<ref name=Microsoft>{{cite web |title=How to Disable the 8.3 Name Creation on NTFS Partitions |publisher=Microsoft |url=https://www.betaarchive.com/wiki/index.php?title=Microsoft_KB_Archive/121007 |access-date=2021-02-26}}</ref> The 8.3 filename can be obtained using the [[Kernel32.dll]] function GetShortPathName.<ref>{{cite web |title=GetShortPathName Function |publisher=[[MSDN]] |url=http://msdn.microsoft.com/en-us/library/aa364989.aspx |access-date=2014-09-15 |url-status=dead |archive-url=https://web.archive.org/web/20151001002209/https://msdn.microsoft.com/en-us/library/aa364989.aspx |archive-date=2015-10-01}}</ref><ref>{{cite web |title=How to Get a Short Filename from a Long Filename |publisher=Microsoft |url=https://www.betaarchive.com/wiki/index.php?title=Microsoft_KB_Archive/175512 |access-date=2021-02-26}}</ref> Although there is no compulsory [[algorithm]] for creating the 8.3 name from an LFN, Windows uses the following convention:<ref>{{cite web |title=How Windows Generates 8.3 File Names from Long File Names |publisher=Microsoft |url=https://www.betaarchive.com/wiki/index.php?title=Microsoft_KB_Archive/142982}}</ref> # If the LFN is 8.3 uppercase, no LFN will be stored on disk at all. #* Example: {{code|TEXTFILE.TXT}} # If the LFN is 8.3 mixed case, the LFN will store the mixed-case name, while the 8.3 name will be an uppercase version of it. #* Example: {{code|TextFile.Txt}} becomes {{code|TEXTFILE.TXT}}. # If the LFN contains more than 8 characters, [[Illegal character|invalid characters]] such as space (which was disallowed by convention though not by the APIs) and those disallowed within [[#Directory table|directory tables]], or an extension more than 3 characters long, the name is stripped of its invalid characters. If the name begins with periods {{code|.}} the leading periods are removed. Other characters such as {{code|+}} are changed to the [[underscore]] {{code|_}}, and letters are put in uppercase. The stripped name is then truncated to the first 6 characters of its [[basename]], followed by a [[tilde]], followed by a single [[numerical digit|digit]], followed by a period {{code|.}}, followed by the first 3 characters of the extension. #* Example: {{code|TextFile.Mine.txt}} becomes {{code|TEXTFI~1.TXT}} (or {{code|TEXTFI~2.TXT}}, should {{code|TEXTFI~1.TXT}} already exist). {{code|ver +1.2.text}} becomes {{code|VER_12~1.TEX}}. {{code|.bashrc.swp}} becomes {{code|BASHRC~1.SWP}} # On all NT versions including [[Windows 2000]] and later, if at least 4 files or folders already exist with the same extension and first 6 characters in their short names, the stripped LFN is instead truncated to the first 2 characters of the basename (or 1 if the basename has only 1 character), followed by 4 [[hexadecimal]] digits derived from an undocumented hash of the filename, followed by a tilde, followed by a single digit, followed by a period {{code|.}}, followed by the first 3 characters of the extension.<ref>{{cite web |last1=Galvin |first1=Thomas |date=9 June 2015 |title=A Tale of Two File Names |url=https://tomgalvin.uk/blog/gen/2015/06/09/filenames/ |archive-url=https://web.archive.org/web/20230825135743/https://tomgalvin.uk/blog/gen/2015/06/09/filenames/ |archive-date=2023-08-25 |access-date=17 October 2022 |website=tomgalvin.uk}}</ref><!-- what if this clashes?--> #* Example: {{code|TextFile.Mine.txt}} becomes {{code|TE021F~1.TXT}}. # On Windows 95, 98 and ME, if more than 9 files or folders with the same extension and first 6 characters and in their short names (so that {{code|~1}} through {{code|~9}} suffixes aren't enough to resolve the collision), the name is further truncated to 5 letters, followed by a tilde, followed by two digits starting from 10, followed by a period {{code|.}} and the first 3 characters of the extension. #* Example: {{code|TextFile.Mine.txt}} becomes {{code|TEXTF~10.TXT}} if {{code|TEXTFI~1.TXT}} through {{code|TEXTFI~9.TXT}} all exist already. During the [[United States v. Microsoft Corp.|2001 Microsoft antitrust case]], the names MICROS~1 and MICROS~2 were humorously used to refer to the companies that might exist after a proposed split of Microsoft.<ref>{{cite web |title=Microsoft One-liner Digest |url=http://www.netfunny.com/rhf/jokes/00/Jun/ms.html}}</ref> [[NTFS]], a file system used by the [[Windows NT]] family, supports LFNs natively, but 8.3 names are still available for legacy applications. Windows [[NTVDM]] are known to use 8.3 names. This can optionally be disabled system-wide to improve performance in situations where large numbers of similarly named files exist in the same folder.<ref name=Microsoft/> 8.3 filename creation can be disabled system-wide and/or per-volume, and existing 8.3 filenames can be stripped using {{code|fsutil}} or a Registry key.<ref>{{cite web |title=Under cmd.exe, how can "del *.tmp" be prevented from deleting *.tmpl files? |website=superuser |url=https://superuser.com/questions/1644682/under-cmd-exe-how-can-del-tmp-be-prevented-from-deleting-tmpl-files}}</ref> The [[ISO 9660]] file system (mainly used on [[compact disc]]s) has similar limitations at the most basic Level 1, with the additional restriction that directory names cannot contain extensions and that some characters (notably [[hyphen]]s) are not allowed in filenames. Level 2 allows filenames of up to 31 characters, more compatible with classic AmigaOS and [[classic Mac OS]] filenames. On [[VFAT]] and [[NTFS]] file systems, 8.3 filenames are stored as ANSI encoding, for backward-compatibility. The [[ReFS]] no longer supports 8.3 filenames.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)