
Filename
A filename or file name is a name used to uniquely identify a computer file in a file system. Different file systems impose different restrictions on filename lengths.
A filename may (depending on the file system) include:
The components required to identify a file by utilities and applications varies across operating systems, as does the syntax and format for a valid filename.
The characters allowed in filenames depend on the file system. The letters A–Z and digits 0–9 are allowed by most file systems; many file systems support additional characters, such as the letters a–z, special characters, and other printable characters such as accented letters, symbols in non-Roman alphabets, and symbols in non-alphabetic scripts. Some file systems allow even unprintable characters, including Bell, Null, Return and Linefeed, to be part of a filename, although most utilities do not handle them well.
Filenames may include things like a revision or generation number of the file such as computer code, a numerical sequence number (widely used by digital cameras through the DCF standard), a date and time (widely used by smartphone camera software and for screenshots), and/or a comment such as the name of a subject or a location or any other text to facilitate the searching the files.
Some people use of the term filename when referring to a complete specification of device, subdirectories and filename such as the Windows C:\Program Files\Microsoft Games\Chess\Chess.exe. The filename in this case is Chess.exe. Some utilities have settings to suppress the extension as with MS Windows Explorer.
$_$_$DEEZ_NUTS#0__titleDEEZ_NUTS$_$_$
$_$_$DEEZ_NUTS#0__subtitleDEEZ_NUTS$_$_$
$_$_$DEEZ_NUTS#0__titleDEEZ_NUTS$_$_$
$_$_$DEEZ_NUTS#0__subtitleDEEZ_NUTS$_$_$
$_$_$DEEZ_NUTS#0__call_to_action.textDEEZ_NUTS$_$_$Length restrictions[edit]
Some filesystems restrict the length of filenames. In some cases, these lengths apply to the entire file name, as in 44 characters in IBM z/OS.[1] In other cases, the length limits may apply to particular portions of the filename, such as the name of a file in a directory, or a directory name. For example, 9 (e.g., 8-bit FAT in Standalone Disk BASIC), 11 (e.g. FAT12, FAT16, FAT32 in DOS), 14 (e.g. early Unix), 21 (Human68K), 31, 30 (e.g. Apple DOS 3.2 and 3.3), 15 (e.g. Apple ProDOS), 44 (e.g. IBM S/370),[1] or 255 (e.g. early Berkeley Unix) characters or bytes. Length limits often result from assigning fixed space in a filesystem to storing components of names, so increasing limits often requires an incompatible change, as well as reserving more space.
A particular issue with filesystems that store information in nested directories is that it may be possible to create a file with a complete pathname that exceeds implementation limits, since length checking may apply only to individual parts of the name rather than the entire name. Many Windows applications are limited to a MAX_PATH
value of 260, but Windows file names can easily exceed this limit.[7] From Windows 10, version 1607, MAX_PATH limitations have been removed.[8]
$_$_$DEEZ_NUTS#2__titleDEEZ_NUTS$_$_$
$_$_$DEEZ_NUTS#2__descriptionDEEZ_NUTS$_$_$
Number of names per file[edit]
Unix-like file systems allow a file to have more than one name; in traditional Unix-style file systems, the names are hard links to the file's inode or equivalent. Windows supports hard links on NTFS file systems, and provides the command fsutil
in Windows XP, and mklink
in later versions, for creating them.[5][6] Hard links are different from Windows shortcuts, classic Mac OS/macOS aliases, or symbolic links. The introduction of LFNs with VFAT allowed filename aliases. For example, longfi~1.???
with a maximum of eight plus three characters was a filename alias of "long file name.???
" as a way to conform to 8.3 limitations for older programs.
This property was used by the move command algorithm that first creates a second filename and then only removes the first filename.
Other filesystems, by design, provide only one filename per file, which guarantees that alteration of one filename's file does not alter the other filename's file.
During the 1970s, some mainframe and minicomputers had operating systems where files on the system were identified by a user name, or account number.
For example, on the TOPS-10 and RSTS/E operating systems from Digital Equipment Corporation, files were identified by
On the OS/VS1, MVS, and OS/390 operating systems from IBM, a file name was up to 44 characters, consisting of upper case letters, digits, and the period. A file name must start with a letter or number, a period must occur at least once each 8 characters, two consecutive periods could not appear in the name, and must end with a letter or digit.[1] By convention, the letters and numbers before the first period was the account number of the owner or the project it belonged to, but there was no requirement to use this convention.[2]
On the McGill University MUSIC/SP system, file names consisted of
The Univac VS/9 operating system had file names consisting of
In 1985, RFC 959 officially defined a pathname to be the character string that must be entered into a file system by a user in order to identify a file.[3]
On early personal computers using the CP/M operating system, filenames were always 11 characters. This was referred to as the 8.3 filename with a maximum of an 8 byte name and a maximum of a 3 byte extension. Utilities and applications allowed users to specify filenames without trailing spaces and include a dot before the extension. The dot was not actually stored in the directory. Using only 7 bit characters allowed several file attributes to be included in the actual filename by using the high-order-bit; these attributes included Readonly, Archive, and System.[4] Eventually this was too restrictive and the number of characters allowed increased. The attribute bits were moved to a special block of the file including additional information.
The original File Allocation Table (FAT) file system, used by Standalone Disk BASIC-80, had a 6.3 file name, with a maximum of 6 bytes in the name and a maximum of 3 bytes in the extension. The FAT12 and FAT16 file systems in IBM PC DOS/MS-DOS and Microsoft Windows prior to Windows 95 used the same 8.3 convention as the CP/M file system. The FAT file systems supported 8-bit characters, allowing them to support non-ASCII characters in file names, and stored the attributes separately from the file name.
Around 1995, VFAT, an extension to the MS-DOS FAT filesystem, was introduced in Windows 95 and Windows NT. It allowed mixed-case long filenames (LFNs), using Unicode characters, in addition to classic "8.3" names.
$_$_$DEEZ_NUTS#6__descriptionDEEZ_NUTS$_$_$
$_$_$DEEZ_NUTS#3__titleDEEZ_NUTS$_$_$
$_$_$DEEZ_NUTS#3__descriptionDEEZ_NUTS$_$_$
Letter case preservation[edit]
Some filesystems, such as FAT, store filenames as upper-case regardless of the letter case used to create them. For example, a file created with the name "MyName.Txt" or "myname.txt" would be stored with the filename "MYNAME.TXT". Any variation of upper and lower case can be used to refer to the same file. These kinds of file systems are called case-insensitive and are not case-preserving. Some filesystems prohibit the use of lower case letters in filenames altogether.
Some file systems store filenames in the form that they were originally created; these are referred to as case-retentive or case-preserving. Such a file system can be case-sensitive or case-insensitive. If case-sensitive, then "MyName.Txt" and "myname.txt" may refer to two different files in the same directory, and each file must be referenced by the exact capitalization by which it is named. On a case-insensitive, case-preserving file system, on the other hand, only one of "MyName.Txt", "myname.txt" and "Myname.TXT" can be the name of a file in a given directory at a given time, and a file with one of these names can be referenced by any capitalization of the name.
From its original inception, Unix and its derivative systems were case-preserving. However, not all Unix-like file systems are case-sensitive; by default, HFS+ in macOS is case-insensitive, and SMB servers usually provide case-insensitive behavior (even when the underlying file system is case-sensitive, e.g. Samba on most Unix-like systems), and SMB client file systems provide case-insensitive behavior. File system case sensitivity is a considerable challenge for software such as Samba and Wine, which must interoperate efficiently with both systems that treat uppercase and lowercase files as different and with systems that treat them the same.[16]
$_$_$DEEZ_NUTS#2__titleDEEZ_NUTS$_$_$
$_$_$DEEZ_NUTS#2__descriptionDEEZ_NUTS$_$_$
$_$_$DEEZ_NUTS#4__titleDEEZ_NUTS$_$_$
$_$_$DEEZ_NUTS#4__descriptionDEEZ_NUTS$_$_$
$_$_$DEEZ_NUTS#5__titleDEEZ_NUTS$_$_$
$_$_$DEEZ_NUTS#5__descriptionDEEZ_NUTS$_$_$
$_$_$DEEZ_NUTS#6__titleDEEZ_NUTS$_$_$
Uniqueness[edit]
Within a single directory, filenames must be unique. Since the filename syntax also applies for directories, it is not possible to create a file and directory entries with the same name in a single directory. Multiple files in different directories may have the same name.
Uniqueness approach may differ both on the case sensitivity and on the Unicode normalization form such as NFC, NFD.
This means two separate files might be created with the same text filename and a different byte implementation of the filename, such as L"\x00C0.txt" (UTF-16, NFC) (Latin capital A with grave) and L"\x0041\x0300.txt" (UTF-16, NFD) (Latin capital A, grave combining).[15]
$_$_$DEEZ_NUTS#8__titleDEEZ_NUTS$_$_$
$_$_$DEEZ_NUTS#8__descriptionDEEZ_NUTS$_$_$
$_$_$DEEZ_NUTS#6__titleDEEZ_NUTS$_$_$
$_$_$DEEZ_NUTS#6__subtextDEEZ_NUTS$_$_$
$_$_$DEEZ_NUTS#4__titleDEEZ_NUTS$_$_$
$_$_$DEEZ_NUTS#4__subtextDEEZ_NUTS$_$_$
$_$_$DEEZ_NUTS#3__titleDEEZ_NUTS$_$_$
$_$_$DEEZ_NUTS#3__subtextDEEZ_NUTS$_$_$
$_$_$DEEZ_NUTS#5__titleDEEZ_NUTS$_$_$
$_$_$DEEZ_NUTS#5__subtextDEEZ_NUTS$_$_$
$_$_$DEEZ_NUTS#9__titleDEEZ_NUTS$_$_$
$_$_$DEEZ_NUTS#9__subtextDEEZ_NUTS$_$_$
$_$_$DEEZ_NUTS#7__titleDEEZ_NUTS$_$_$
$_$_$DEEZ_NUTS#7__subtextDEEZ_NUTS$_$_$
$_$_$DEEZ_NUTS#1__titleDEEZ_NUTS$_$_$
$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