8.3 filename

8.3 filename

An 8.3 filename [cite web |url=http://msdn2.microsoft.com/en-us/library/aa365247.aspx |title=Naming a File |publisher=Microsoft Developer Network ] (also called a short filename or SFN) is a filename convention used by old versions of DOS and versions of Microsoft Windows prior to Windows 95 and Windows NT 3.51. It is also used in modern Microsoft operating systems as an alternate filename to the long filename for compatibility with legacy programs. The filename convention is limited by the FAT file system. Similar 8.3 file naming schemes have also existed on earlier CP/M and on some Data General and Digital Equipment Corporation minicomputer operating systems.

Overview

8.3 filenames have at most eight characters, optionally followed by a "." and a filename extension of at most three characters. For files with no extension, the "." if present has no significance (that is "myfile" and "myfile." are equivalent). File and directory names are uppercase, although systems that use the 8.3 standard are usually case-insensitive.

VFAT, a variant of FAT with an extended directory format, was introduced in Windows 95 and Windows NT 3.51. It allowed mixed-case Unicode long filenames (LFNs) in addition to classic 8.3 names.

To maintain backward-compatibility with legacy applications (on DOS and Windows 3.1), an 8.3 filename is automatically generated for every LFN, through which the file can still be renamed, deleted or opened.

Although there is no compulsory algorithm for creating the 8.3 name from an LFN, Windows uses the following convention:
# If the LFN is 8.3 uppercase, no LFN will be stored on disk at all.
#* Example: "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 uppercased version of it.
#* Example: "TextFile.Txt" becomes "TEXTFILE.TXT".
# If the filename contains characters not allowed in an 8.3 name (including space which was disallowed by convention though not by the APIs) or either part is too long, the name is stripped of invalid characters such as spaces and extra periods. Other characters such as (+) are changed to the underscore (_), and uppercased. The stripped name is then truncated to the first 6 letters of its basename, followed by a tilde, followed by a single digit, followed by the first 3 characters of the extension.
#* Example: "TextFile1.Mine.txt" becomes "TEXTFI~1.TXT" (or "TEXTFI~2.TXT", should "TEXTFI~1.TXT" already exist). "ver +1.2.text" becomes "VER_12~1.TEX".
# Beginning with Windows 2000, if at least 4 files or folders already exist with the same initial 6 characters in their short names, the stripped LFN is instead truncated to the first 2 letters of the basename (or 1 if the basename has only 1 letter), followed by 4 hexadecimal digits derived from an undocumented hash of the filename, followed by a tilde, followed by a single digit, followed by the first 3 characters of the extension.
#* Example: "TextFile.Mine.txt" becomes "TE021F~1.TXT".

The NTFS file system used by the Windows NT family supports LFNs natively, but 8.3 names are still available for legacy applications. This can be [http://www.microsoft.com/technet/prodtechnol/winxppro/reskit/c13621675.mspx optionally disabled] to increase performance in situations where large numbers of similarly-named files exist in the same folder.

The ISO 9660 file system (mainly used on compact discs) has similar limitations at the most basic Level 1, with the additional restriction that directory names cannot contain extensions and that some characters (notably hyphens) are not allowed in filenames. Level 2 allows filenames of up to 31 characters, more compatible with Mac OS filenames.

During the Microsoft antitrust trials, the names MICROS~1 and MICROS~2 were humorously used to refer to the companies that might exist after a proposed split of Microsoft.

Compatibility

This legacy technology is used in a wide range of products and devices, as a standard for interchanging information, such as compact flash cards used in cameras. VFAT LFN Long filenames introduced by Windows 95/98/ME retained compatibility. But the VFAT LFN used on NT-based systems (Windows NT/2K/XP) uses a modified 8.3 shortname.

If a filename contains only lowercase letters, or is a combination of a lowercase "basename" with an uppercase "extension", or vice-versa; and has no special characters, and fits within the 8.3 limits, a VFAT entry is not created on Windows NT and later versions such as XP. Instead, two bits in byte 0x0c of the directory entry are used to indicate that the filename should be considered as entirely or partially lowercase. Specifically, bit 4 means lowercase "extension" and bit 3 lowercase "basename", which allows for combinations such as "example.TXT" or "HELLO.txt" but not "Mixed.txt". Few other operating systems support this. This creates a backwards-compatibility problem with older Windows versions (95, 98, ME) that see all-uppercase filenames if this extension has been used, and therefore can change the name of a file when it is transported, such as on a USB flash drive. Current 2.6.x versions of Linux will recognize this extension when reading (source: kernel 2.6.18 /fs/fat/dir.c and fs/vfat/namei.c); the mount option "shortname" determines whether this feature is used when writing. [http://www.die.net/doc/linux/man/man8/mount.8.html]

Directory table

A directory table is a special type of file that represents a directory (nowadays commonly known as a folder). Each file or directory stored within it is represented by a 32-byte entry in the table. Each entry records the name, extension, attributes (archive, directory, hidden, read-only, system and volume), the date and time of creation, the address of the first cluster of the file/directory's data and finally the size of the file/directory.

Legal characters for DOS filenames include the following:
* Upper case letters A–Z
* Numbers 0–9
* Space (though trailing spaces in either the base name or the extension are considered to be padding and not a part of the filename, also filenames with spaces in them could not be used on the DOS command line because it lacked a suitable escaping system)
* ! # $ % & ' ( ) - @ ^ _ ` { } ~
* (FAT-32 only) + , . ; = [ ]
* Values 128–255

This excludes the following ASCII characters:
* " * / : < > ? |
Windows/MSDOS has no shell escape character
* Lower case letters a&ndash;z
stored as A&ndash;Z on FAT-12/16
* Control characters 0&ndash;31
* Value 127 (DEL), which makes troubles when Cyrillic KOI-8 encoding is used, because it corresponds to Cyrillic capital letter "Е". Some operating systems such as ANDOS used to automatically change the letter to the similar-looking Latin one.

The DOS filenames are in the OEM character set.

Directory entries, both in the Root Directory Region and in subdirectories, are of the following format:

An attribute value of 0x0F is used to designate a long filename entry.
-
align="right"|0x0c
align="right"|1
Reserved; two bits are used by NT and later versions to encode case information
-
align="right"|0x0d
align="right"|1
Create time, fine resolution: 10ms units, values from 0 to 199.
-
align="right"|0x0e
align="right"|2
Create time. The hour, minute and second are encoded according to the following bit

See also

* Long filename
* File Allocation Table - FAT
* File system

References

External links

*Large list of known 8.3 computer file extensions: [http://www.file-extensions.org/ File-extensions.org]


Wikimedia Foundation. 2010.

Look at other dictionaries:

  • filename — file‧name [ˈfaɪlneɪm] noun [countable] COMPUTING the name that you give to a computer file and which you use when you want to open it, remove it, put it on disk etc: • Enter the filename, or press F1 for a list of available filenames. * * *… …   Financial and business terms

  • Filename extension — A filename extension is a suffix (separated from the basefilename by a dot) to the name of a computer file applied to indicate the encoding (file format) of its contents or usage. Some filesystems limit the length of the extension (such as the… …   Wikipedia

  • Filename — Screenshot of a Windows command shell showing filenames in a directory The filename is metadata about a file; a string used to uniquely identify a file stored on the file system. Different file systems impose different restrictions on length and… …   Wikipedia

  • Filename mangling — dablink|This article discusses the mangling of filenames for operating system compatibility.For the concept of name mangling within compilers, see name mangling.The process of name mangling, in computing, involves a re writing of the file name… …   Wikipedia

  • filename extension — noun a string of characters beginning with a period and followed by one or more letters; the optional second part of a PC computer filename most applications provide extensions for the files they create most BASIC files use the filename extension …   Useful english dictionary

  • filename — UK [ˈfaɪlˌneɪm] / US noun [countable] Word forms filename : singular filename plural filenames computing the name that someone gives to a particular computer file …   English dictionary

  • filename —    The name of a file on a disk used so that both you and the operating system can find the file again. Every file in a directory must have a unique name, but files in different directories can share the same name.    In MS DOS, file and… …   Dictionary of networking

  • filename — noun (computer science) the name given to a computer file in order to distinguish it from other files; may contain an extension that indicates the type of file • Syn: ↑file name, ↑computer filename, ↑computer file name • Topics: ↑computer science …   Useful english dictionary

  • filename extension —    In the MS DOS file allocation table (FAT) file system, an optional three character suffix added to the end of a filename and separated from the name by a period …   Dictionary of networking

  • filename — /fuyl naym /, n. an identifying name given to an electronically stored computer file, conforming to limitations imposed by the operating system, as in length or restricted choice of characters. * * * …   Universalium

  • filename — noun The name assigned to a collection of records (i.e. lines) within a filesystem …   Wiktionary

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”