Filename

Last updated

Screenshot of a Windows command shell showing filenames in a directory Dir command in Windows Command Prompt.png
Screenshot of a Windows command shell showing filenames in a directory
Filename list, with long filenames containing comma and space characters as they appear in a software display. EMule v.049b.JPG
Filename list, with long filenames containing comma and space characters as they appear in a software display.

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.

Contents

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,[ citation needed ] 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.[ not verified in body ]

History

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.[ citation needed ]

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.

References: absolute vs relative

An absolute reference includes all directory levels. In some systems, a filename reference that does not include the complete directory path defaults to the current working directory. This is a relative reference. One advantage of using a relative reference in program configuration files or scripts is that different instances of the script or program can use different files.

This makes an absolute or relative path composed of a sequence of filenames.

Number of names per file

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.

Length restrictions

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]

Filename extensions

Filenames in some file systems, such as FAT and the ODS-1 and ODS-2 levels of Files-11, are composed of two parts: a base name or stem and an extension or suffix used by some applications to indicate the file type. Some other file systems, such as Unix file systems, VFAT, and NTFS, treat a filename as a single string; a convention often used on those file systems is to treat the characters following the last period in the filename, in a filename containing periods, as the extension part of the filename.

Multiple output files created by an application may use the same basename and various extensions. For example, a Fortran compiler might use the extension FOR for source input file, OBJ for the object output and LST for the listing. Although there are some common extensions, they are arbitrary and a different application might use REL and RPT. Extensions have been restricted, at least historically on some systems, to a length of 3 characters, but in general can have any length, e.g., html.

Encoding interoperability

There is no general encoding standard for filenames.

File names have to be exchanged between software environments for network file transfer, file system storage, backup and file synchronization software, configuration management, data compression and archiving, etc. It is thus very important not to lose file name information between applications. This led to wide adoption of Unicode as a standard for encoding file names, although legacy software might not be Unicode-aware.

Encoding indication interoperability

Traditionally, filenames allowed any character in their filenames as long as they were file system safe. [9] Although this permitted the use of any encoding, and thus allowed the representation of any local text on any local system, it caused many interoperability issues.

A filename could be stored using different byte strings in distinct systems within a single country, such as if one used Japanese Shift JIS encoding and another Japanese EUC encoding. Conversion was not possible as most systems did not expose a description of the encoding used for a filename as part of the extended file information. This forced costly filename encoding guessing with each file access. [9]

A solution was to adopt Unicode as the encoding for filenames.

In the classic Mac OS, however, encoding of the filename was stored with the filename attributes. [9]

Unicode interoperability

The Unicode standard solves the encoding determination issue.

Nonetheless, some limited interoperability issues remain, such as normalization (equivalence), or the Unicode version in use. For instance, UDF is limited to Unicode 2.0; macOS's HFS+ file system applies NFD Unicode normalization and is optionally case-sensitive (case-insensitive by default.) Filename maximum length is not standard and might depend on the code unit size. Although it is a serious issue, in most cases this is a limited one. [9]

On Linux, this means the filename is not enough to open a file: additionally, the exact byte representation of the filename on the storage device is needed. This can be solved at the application level, with some tricky normalization calls. [10]

The issue of Unicode equivalence is known as "normalized-name collision". A solution is the Non-normalizing Unicode Composition Awareness used in the Subversion and Apache technical communities. [11] This solution does not normalize paths in the repository. Paths are only normalized for the purpose of comparisons. Nonetheless, some communities have patented this strategy, forbidding its use by other communities.[ clarification needed ]

Perspectives

To limit interoperability issues, some ideas described by Sun are to:

Those considerations create a limitation not allowing a switch to a future encoding different from UTF-8.

Unicode migration

One issue was migration to Unicode. For this purpose, several software companies provided software for migrating filenames to the new Unicode encoding.

Mac OS X 10.3 marked Apple's adoption of Unicode 3.2 character decomposition, superseding the Unicode 2.1 decomposition used previously. This change caused problems for developers writing software for Mac OS X. [14]

Uniqueness

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]

Letter case preservation

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]

Reserved characters and words

File systems have not always provided the same character set for composing a filename. Before Unicode became a de facto standard, file systems mostly used a locale-dependent character set. By contrast, some new systems permit a filename to be composed of almost any character of the Unicode repertoire, and even some non-Unicode byte sequences. Limitations may be imposed by the file system, operating system, application, or requirements for interoperability with other systems.

Many file system utilities prohibit control characters from appearing in filenames. In Unix-like file systems, the null character [17] and the path separator / are prohibited.

Problematic characters

File system utilities and naming conventions on various systems prohibit particular characters from appearing in filenames or make them problematic: [7] Except as otherwise stated, the symbols in the Character column, " and < for example, cannot be used in Windows filenames.

CharacterNameReason for prohibition
/ slash Used as a path name component separator in Unix-like, Windows, and Amiga systems. (For as long as the SwitChar setting is set to /, the DOS COMMAND.COM shell would consume it as a switch character, but DOS and Windows themselves always accept it as a separator on API level.)
The big solidus (Unicode code point U+29F8) is permitted in Windows filenames.
\ backslash Used as the default path name component separator in DOS, OS/2 and Windows (even if the SwitChar is set to '-'; allowed in Unix filenames, see Note 1).
The big reverse solidus (U+29F9) is permitted in Windows filenames.
? question mark Used as a wildcard in Unix, Windows and AmigaOS; marks a single character. Allowed in Unix filenames, see Note 1.
The glottal stop ʔ (U+0294), the interrobang (U+203D), the inverted question mark ¿ (U+00BF), the double question mark (U+2047), and the black question mark ornament❓(U+2753) are allowed in all filenames.
% percent Used as a wildcard in RT-11; marks a single character. Not special on Windows.
* asterisk
or star
Used as a wildcard in Unix, DOS, RT-11, VMS and Windows. Marks any sequence of characters (Unix, Windows, DOS) or any sequence of characters in either the basename or extension (thus *.* in DOS means "all files"). Allowed in Unix filenames, see Note 1.
See Star (glyph) for many asterisk-like characters allowed in filenames.
: colon Used to determine the mount point / drive on Windows; used to determine the virtual device or physical device such as a drive on AmigaOS, RT-11 and VMS; used as a pathname separator in classic Mac OS. Doubled after a name on VMS, indicates the DECnet nodename (equivalent to a NetBIOS (Windows networking) hostname preceded by \\.) Colon is also used in Windows to separate an alternative data stream from the main file.
The letter colon (U+A789) and the ratio symbol (U+2236) are permitted in Windows filenames. In the Segoe UI font, used in Windows Explorer, the glyphs for the colon and the letter colon are identical.
| vertical bar
or pipe
Designates software pipelining in Unix, DOS and Windows; allowed in Unix filenames, see Note 1. The mathematical operator divides (U+2223) is permitted in Windows filenames.
" straight double quote A legacy restriction carried over from DOS. The single quotes ' (U+0027), (U+2018), and (U+2019) and the curved double quotes left double quotation mark (U+201C) and right double quotation mark (U+201D) are permitted anywhere in filenames. See Note 1.
< less than Used to redirect input, allowed in Unix filenames, see Note 1. The spacing modifier letter left arrowhead ˂ (U+02C2) is permitted in Windows filenames.
> greater than Used to redirect output, allowed in Unix filenames, see Note 1. The spacing modifier letter right arrowhead ˃ (U+02C3) is permitted in Windows filenames.
. period
or dot
Folder names cannot end with a period in Windows, though the name can end with a period followed by a whitespace character such as a non-breaking space. Elsewhere, the period is allowed, but the last occurrence will be interpreted to be the extension separator in VMS, DOS, and Windows. In other OSes, usually considered as part of the filename, and more than one period (full stop) may be allowed. In Unix, a leading period means the file or folder is normally hidden.
, comma Allowed, but treated as separator by the command line interpreters COMMAND.COM and CMD.EXE on DOS and Windows.
; semicolon Allowed, but treated as separator by the command line interpreters Bourne shell (and compatibles) and C shell (and compatibles) on Unix-like systems, and COMMAND.COM and CMD.EXE on DOS and Windows. See Note 1.
= equals sign Allowed, but treated as separator by the command line interpreters COMMAND.COM and CMD.EXE on DOS and Windows.
space
Allowed, but the space is also used as a parameter separator in command line applications; see Note 1.

Note 1: While they are allowed in Unix file and folder names, most Unix shells require specific characters such as spaces, <, >, |, \, and sometimes :, (, ), &, ;, #, as well as wildcards such as ? and *, to be quoted or escaped:

five\ and\ six\<seven (example of escaping)
'five and six<seven' or "five and six<seven" (examples of quoting)

The character å (0xE5) was not allowed as the first letter in a filename under 86-DOS and MS-DOS/PC DOS 1.x-2.x, but can be used in later versions.

In Windows utilities, the space and the period are not allowed as the final character of a filename. [18] The period is allowed as the first character, but some Windows applications, such as Windows Explorer, forbid creating or renaming such files (despite this convention being used in Unix-like systems to describe hidden files and directories). Workarounds include appending a dot when renaming the file (that is then automatically removed afterwards), using alternative file managers, creating the file using the command line, or saving a file with the desired filename from within an application. [19]

Some file systems on a given operating system (especially file systems originally implemented on other operating systems), and particular applications on that operating system, may apply further restrictions and interpretations. See comparison of file systems for more details on restrictions.

In Unix-like systems, DOS, and Windows, the filenames "." and ".." have special meanings (current and parent directory respectively). Windows 95/98/ME also uses names like "...", "...." and so on to denote grandparent or great-grandparent directories. [20] All Windows versions forbid creation of filenames that consist of only dots, although names consist of three dots ("...") or more are legal in Unix.

In addition, in Windows and DOS utilities, some words are also reserved and cannot be used as filenames. [19] For example, DOS device files: [21]

CON, CONIN$, CONOUT$, PRN, AUX, CLOCK$, NUL COM0, COM1, COM2, COM3, COM4, COM5, COM6, COM7, COM8, COM9 [7]  LPT0, LPT1, LPT2, LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, LPT9 [7]  LST (only in 86-DOS and DOS 1.xx) KEYBD$, SCREEN$ (only in multitasking MS-DOS 4.0) $IDLE$ (only in Concurrent DOS 386, Multiuser DOS and DR DOS 5.0 and higher) CONFIG$ (only in MS-DOS 7.0-8.0)

Systems that have these restrictions cause incompatibilities with some other filesystems. For example, Windows will fail to handle, or raise error reports for, these legal UNIX filenames: aux.c, [22] q"uote"s.txt, or NUL.txt.

NTFS filenames that are used internally include:

$Mft, $MftMirr, $LogFile, $Volume, $AttrDef, $Bitmap, $Boot, $BadClus, $Secure, $Upcase, $Extend, $Quota, $ObjId and $Reparse

Comparison of filename limitations

SystemCase
sensitive
Case
preserving
Allowed character setReserved charactersReserved wordsMaximum length (characters)Comments
8-bit FAT  ? ?7-bitASCII (but stored as bytes)first character not allowed to be 0x00 or 0xFF9Maximum 9 character base name limit for sequential files (without extension), or maximum 6 and 3 character extension for binary files; see 6.3 filename
FAT12, FAT16, FAT32 NoNoany SBCS/DBCS OEM codepage 0x00–0x1F 0x7F " * / : < > ? \ | + , . ; = [ ] (in some environments also: ! @; DOS 1/2 did not allow 0xE5 as first character)Device names including:$IDLE$ AUX COM1...COM4 CON CONFIG$ CLOCK$ KEYBD$ LPT1...LPT4 LST NUL PRN SCREEN$ (depending on AVAILDEV status everywhere or only in virtual \DEV\ directory)11Maximum 8 character base name limit and 3 character extension; see 8.3 filename
VFAT NoYes Unicode, using UCS-2 encoding0x00–0x1F 0x7F " * / : < > ? \ |255
exFAT NoYes Unicode, using UTF-16 encoding0x00–0x1F 0x7F " * / : < > ? \ |255
NTFS OptionalYes Unicode, using UTF-16 encoding0x00–0x1F 0x7F " * / : < > ? \ |Only in root directory: $AttrDef $BadClus $Bitmap $Boot $LogFile $MFT $MFTMirr pagefile.sys $Secure $UpCase $Volume $Extend $Extend\$ObjId $Extend\$Quota $Extend\$Reparse ($Extend is a directory)255Paths can be up to 32,000 characters.

Forbids the use of characters in range 1–31 (0x01–0x1F) and characters " * / : < > ? \ | unless the name is flagged as being in the Posix namespace. NTFS allows each path component (directory or filename) to be 255 characters long [ dubious ].

Windows forbids the use of the MS-DOS device names AUX, CLOCK$, COM0, ..., COM9, CON, LPT0, ..., LPT9, NUL and PRN, as well as these names with any extension (for example, AUX.txt), except when using Long UNC paths (ex. \\.\C:\nul.txt or \\?\D:\aux\con). (CLOCK$ may be used, if an extension is provided.) The Win32 API strips trailing period (full-stop), and leading and trailing space characters from filenames, except when UNC paths are used. These restrictions only apply to Windows; in Linux distributions that support NTFS, filenames are written using NTFS's Posix namespace, which allows any Unicode character except / and NUL.

OS/2 HPFS NoYesany 8-bit set|\?*<":>/254
Mac OS HFS NoYesany 8-bit set :255old versions of Finder are limited to 31 characters
HFS+ OptionalYes Unicode, using UTF-16 encoding : on disk, in classic Mac OS, and at the Carbon layer in macOS; / at the Unix layer in macOS255Mac OS 8.1 - macOS
APFS OptionalYes Unicode, using UTF-8 encoding [23] In the Finder, filenames containing / can be created, but / is stored as a colon (:) in the filesystem, and is shown as such on the command line. Filenames containing : created from the command line are shown with / instead of : in the Finder, so that it is impossible to create a file that the Finder shows as having a : in its filename.255 macOS Sierra (10.12.4) and later, iOS 10.3 and later, tvOS 10.2 and later, watchOS 3.2 and later, iPadOS
most UNIX file systemsYesYesany 8-bit set/ null 255a leading . indicates that ls and file managers will not show the file by default
z/OS classic MVS filesystem (datasets)NoNo EBCDIC code pages other than $ # @ - x'C0'44first character must be alphabetic or national ($, #, @)

"Qualified" contains . after every 8 characters or fewer. [1] Partitioned data sets (PDS or PDSE) are divided into members with names of up to 8 characters; the member name is placed in parenthesises after the name of the PDS, e.g. PAYROLL.DEV.CBL(PROG001)

CMS file system NoNo EBCDIC code pages 8 + 8Single-level directory structure with disk letters (A–Z). Maximum of 8 character file name with maximum 8 character file type, separated by whitespace. For example, a TEXT file called MEMO on disk A would be accessed as "MEMO TEXT A". (Later versions of VM introduced hierarchical filesystem structures, SFS and BFS, but the original flat directory "minidisk" structure is still widely used.)
early UNIX (AT&T Corporation)YesYesany 8-bit set/14a leading . indicates a "hidden" file
POSIX "Fully portable filenames" [24] YesYesA–Z a–z 0–9 . _ -/ null14hyphen must not be first character. A command line utility checking for conformance, "pathchk", is part of the IEEE 1003.1 standard and of The Open Group Base Specifications [25]
ISO 9660 No ?A–Z 0–9 _ ."close to 180"(Level 2) or 200(Level 3)Used on CDs; 8 directory levels max (for Level 1, not level 2,3)
Amiga OFS NoYesany 8-bit set : / null30Original File System 1985
Amiga FFS NoYesany 8-bit set : / null30Fast File System 1988
Amiga PFS NoYesany 8-bit set : / null107Professional File System 1993
Amiga SFS NoYesany 8-bit set : / null107Smart File System 1998
Amiga FFS2NoYesany 8-bit set : / null107Fast File System 2 2002
BeOS BFS YesYes Unicode, using UTF-8 encoding/255
DEC PDP-11 RT-11 NoNo RADIX-50 6 + 3Flat filesystem with no subdirs. A full "file specification" includes device, filename and extension (file type) in the format: dev:filnam.ext.
DEC VAX VMS NoFrom
v7.2
A–Z 0–9 $ - _32 per component; earlier 9 per component; latterly, 255 for a filename and 32 for an extension.a full "file specification" includes nodename, diskname, directory/ies, filename, extension and version in the format: OURNODE::MYDISK:[THISDIR.THATDIR]FILENAME.EXTENSION;2 Directories can only go 8 levels deep.
Commodore DOS YesYesany 8-bit set :, =$16length depends on the drive, usually 16
HP 250 YesYesany 8-bit setSPACE ", : NULL CHR$(255)6Disks and tape drives are addressed either using a label (up to 8 characters) or a unit specification. The HP 250 file system does not use directories, nor does it use extensions to indicate file type. Instead the type is an attribute (e.g. DATA, PROG, BKUP or SYST for data files, program files, backups and the OS itself). [26]

See also

Related Research Articles

<span class="mw-page-title-main">ISO 9660</span> File system for CD-R and CD-ROM optical discs

ISO 9660 is a file system for optical disc media. The file system is an international standard available from the International Organization for Standardization (ISO). Since the specification is available for anybody to purchase, implementations have been written for many operating systems.

<span class="mw-page-title-main">Case sensitivity</span> Defines whether uppercase and lowercase letters are treated as distinct

In computers, case sensitivity defines whether uppercase and lowercase letters are treated as distinct (case-sensitive) or equivalent (case-insensitive). For instance, when users interested in learning about dogs search an e-book, "dog" and "Dog" are of the same significance to them. Thus, they request a case-insensitive search. But when they search an online encyclopedia for information about the United Nations, for example, or something with no ambiguity regarding capitalization and ambiguity between two or more terms cut down by capitalization, they may prefer a case-sensitive search.

An 8.3 filename is one that obeys the filename convention used by old versions of DOS and versions of Microsoft Windows prior to Windows 95 and Windows NT 3.5. It is also used in modern Microsoft operating systems as an alternate filename to the long filename, to provide 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, TRS-80, Atari, and some Data General and Digital Equipment Corporation minicomputer operating systems.

A filename extension, file name extension or file extension is a suffix to the name of a computer file. The extension indicates a characteristic of the file contents or its intended use. A filename extension is typically delimited from the rest of the filename with a period, but in some systems it is separated with spaces.

A text file is a kind of computer file that is structured as a sequence of lines of electronic text. A text file exists stored as data within a computer file system. In operating systems such as CP/M and DOS, where the operating system does not keep track of the file size in bytes, the end of a text file is denoted by placing one or more special characters, known as an end-of-file (EOF) marker, as padding after the last line in a text file. On modern operating systems such as Microsoft Windows and Unix-like systems, text files do not contain any special EOF character, because file systems on those operating systems keep track of the file size in bytes. Most text files need to have end-of-line delimiters, which are done in a few different ways depending on operating system. Some operating systems with record-orientated file systems may not use new line delimiters and will primarily store text files with lines separated as fixed or variable length records.

<span class="mw-page-title-main">Newline</span> Special characters in computing signifying the end of a line of text

A newline is a control character or sequence of control characters in character encoding specifications such as ASCII, EBCDIC, Unicode, etc. This character, or a sequence of characters, is used to signify the end of a line of text and the start of a new one.

Peripheral Interchange Program (PIP) was a utility to transfer files on and between devices on Digital Equipment Corporation's computers. It was first implemented on the PDP-6 architecture by Harrison "Dit" Morse early in the 1960s. It was subsequently implemented for DEC's operating systems for PDP-10, PDP-11, and PDP-8 architectures. In the 1970s and 1980s Digital Research implemented PIP on CP/M and MP/M.

A path is a string of characters used to uniquely identify a location in a directory structure. It is composed by following the directory tree hierarchy in which components, separated by a delimiting character, represent each directory. The delimiting character is most commonly the slash ("/"), the backslash character ("\"), or colon (":"), though some operating systems may use a different delimiter. Paths are used extensively in computer science to represent the directory/file relationships common in modern operating systems and are essential in the construction of Uniform Resource Locators (URLs). Resources can be represented by either absolute or relative paths.

The process of filename mangling, in computing, involves a translation of the file name for compatibility at the operating system level. It occurs when a filename on a filesystem appears in a form incompatible with the operating system accessing it. Such mangling occurs, for example, on computer networks when a Windows machine attempts to access a file on a Unix server and that file has a filename which includes characters not valid in Windows.

HFS Plus or HFS+ is a journaling file system developed by Apple Inc. It replaced the Hierarchical File System (HFS) as the primary file system of Apple computers with the 1998 release of Mac OS 8.1. HFS+ continued as the primary Mac OS X file system until it was itself replaced with the Apple File System (APFS), released with macOS High Sierra in 2017. HFS+ is also one of the formats supported by the iPod digital music player.

<span class="mw-page-title-main">File system</span> Computer filing system

In computing, a file system or filesystem governs file organization and access. A local file system is a capability of an operating system that services the applications running on the same computer. A distributed file system is a protocol that provides file access between networked computers.

A directory traversal attack exploits insufficient security validation or sanitization of user-supplied file names, such that characters representing "traverse to parent directory" are passed through to the operating system's file system API. An affected application can be exploited to gain unauthorized access to the file system.

In computer data storage, a volume or logical drive is a single accessible storage area with a single file system, typically resident on a single partition of a hard disk. Although a volume might be different from a physical disk drive, it can still be accessed with an operating system's logical interface. However, a volume differs from a partition.

Long filename (LFN) support is Microsoft's backward-compatible extension of the 8.3 filename naming scheme used in DOS. Long filenames can be more descriptive, including longer filename extensions such as .jpeg, .tiff, .html, and .xhtml that are common on other operating systems, rather than specialized shortened names such as .jpg, .tif, .htm, or .xht. The standard has been common with File Allocation Table (FAT) filesystems since its first implementation in Windows NT 3.5 of 1994.

The following tables compare general and technical information for a number of file systems.

In programming, a file uniform resource identifier (URI) scheme is a specific format of URI, used to specifically identify a file on a host computer. While URIs can be used to identify anything, there is specific syntax associated with identifying files.

A batch file is a script file in DOS, OS/2 and Microsoft Windows. It consists of a series of commands to be executed by the command-line interpreter, stored in a plain text file. A batch file may contain any command the interpreter accepts interactively and use constructs that enable conditional branching and looping within the batch file, such as IF, FOR, and GOTO labels. The term "batch" is from batch processing, meaning "non-interactive execution", though a batch file might not process a batch of multiple data.

In Unix-like operating systems, a device file or device node or special file is an interface to a device driver that appears in a file system as if it were an ordinary file. There are also special files in DOS, OS/2, and Windows. These special files allow an application program to interact with a device by using its device driver via standard input/output system calls. Using standard system calls simplifies many programming tasks, and leads to consistent user-space I/O mechanisms regardless of device features and functions.

A file format is a standard way that information is encoded for storage in a computer file. It specifies how bits are used to encode information in a digital storage medium. File formats may be either proprietary or free.

In computing, findstr is a command in the command-line interpreters (shells) of Microsoft Windows and ReactOS. It is used to search for a specific text string in computer files.

References

  1. 1 2 3 4 "Data Set Naming Rules". z/OS TSO/E User's Guide. IBM.
  2. "Data Set Naming Conventions". z/OS TSO/E User's Guide. IBM.
  3. File Transfer Protocol (FTP). doi: 10.17487/RFC0959 . RFC 959.
  4. "CPM - CP/M disk and file system format".
  5. "Fsutil command description page". Microsoft.com. Archived from the original on October 6, 2013. Retrieved September 15, 2013.
  6. "NTFS Hard Links, Directory Junctions, and Windows Shortcuts". Flex hex. Inv Softworks. Archived from the original on July 11, 2011. Retrieved March 12, 2011.
  7. 1 2 3 4 "Naming Files, Paths, and Namespaces". December 15, 2022. Retrieved October 8, 2023.
  8. "Maximum Path Length Limitation - Win32 apps". July 18, 2022.
  9. 1 2 3 4 5 David Robinson; Ienup Sung; Nicolas Williams (March 2006). "Solaris presentations: File Systems, Unicode, and Normalization" (PDF). San Francisco: Sun.com. Archived from the original (PDF) on July 4, 2012.
  10. "Filenames with accents". Ned Batchelder. June 2011. Retrieved September 17, 2013.
  11. "NonNormalizingUnicodeCompositionAwareness - Subversion Wiki". Wiki.apache.org. January 21, 2013. Retrieved October 8, 2023.
  12. "File Name Encoding Repair Utility v1.0". Support.apple.com. June 1, 2006. Retrieved October 2, 2018.
  13. "convmv - converts filenames from one encoding to another". J3e.de. Retrieved September 17, 2013.
  14. "Re: git on MacOSX and files with decomposed utf-8 file names". KernelTrap. May 7, 2010. Archived from the original on March 15, 2011. Retrieved July 5, 2010.
  15. "Cross platform filepath naming conventions - General Programming". GameDev.net. Retrieved October 8, 2023.
  16. "CaseInsensitiveFilenames - The Official Wine Wiki". Wiki.winehq.org. November 8, 2009. Archived from the original on August 18, 2010. Retrieved August 20, 2010.
  17. "The Open Group Base Specifications Issue 6". IEEE Std 1003.1-2001. The Open Group. 2001.
  18. "Windows Naming Conventions". MSDN, Microsoft.com. See last bulleted item.
  19. 1 2 Naming a file msdn.microsoft.com (MSDN), filename restrictions on Windows
  20. Microsoft Windows 95 README for Tips and Tricks, Microsoft, archived from the original on November 1, 2014
  21. MS-DOS Device Driver Names Cannot be Used as File Names, Microsoft, archived from the original on March 20, 2014
  22. Ritter, Gunnar (January 30, 2007). "The tale of "aux.c"". Heirloom Project.
  23. "Apple File System Reference" (PDF). Apple Inc.
  24. Lewine, Donald. POSIX Programmer's Guide: Writing Portable UNIX Programs 1991 O'Reilly & Associates, Inc. Sebastopol, CA pp63–64
  25. pathchk - check pathnames
  26. Hewlett-Packard Company Roseville, CA HP 250 Syntax Reference Rev 1/84 Manual Part no 45260-90063