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
Filename mangling
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!
{{Short description|Translation of the file name for compatibility at the operating system level}} {{about|the mangling of filenames for operating system compatibility|the concept of name mangling within compilers|name mangling}} {{Refimprove|date=July 2007}} 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 network]]s when a [[Microsoft Windows|Windows]] machine attempts to access a file on a [[Unix]] server and that file has a filename which includes characters not valid in Windows. ==FAT Derivative Filesystem== {{main|File Allocation Table|8.3}} ===Legacy support under VFAT=== A common example of name mangling occurs on [[File Allocation Table|VFAT]] file systems on versions of Windows from [[Windows 95]] onwards. The VFAT specification{{clarify|date=December 2016}} allows [[Long File Name]]s (LFNs). For backwards-compatibility with [[MS-DOS]] and older Windows software, which recognizes filenames of a maximum of 11 characters in length with [[8.3]] format (i.e.: an eight-letter filename, a dot and a three-letter extension, such as <code>autoexec.bat</code>), files with LFNs get stored on disk in 8.3 format (<code>longfilename.txt</code> becoming <code>longfi~1.txt</code>), with the long file name stored elsewhere on the disk. Normally{{clarify|date=December 2016}}, when using compatible Windows programs which use standard Windows methods{{which|date=December 2016}} of reading the disk, the [[input/output|I/O]] subsystem returns the long filename to the program — however, if an old DOS application or an old Windows application tries to address the file, it will use the older, 8.3-only APIs, or work at a lower level and perform its own disk access, which results in the return of an 8.3 filename. In this case, the filenames become mangled by taking the first six non-space characters in the filename and adding a [[tilde]] (~) and then a number to ensure the uniqueness of the 8.3 filename on the disk. This mangling scheme can turn (for example) <code>Program Files</code> into <code>PROGRA~1</code>. This technique persists today when people use [[DOSBox]] to play classic DOS games or use [[Windows 3.1]] in conjunction to play [[Win16]] games on 64-bit Windows. ==Unix Filesystems== {{which|date=December 2016}} Unix file names can contain [[colon (punctuation)|colon]]s or [[backslash]]es, whereas Windows interprets such characters in other{{which|date=December 2016}} ways. Accordingly{{clarify|date=December 2016}}, software could mangle the Unix file "Notes: 11\04\03" as "Notes_ 11-04-03" to enable Windows software to remotely access the file. Other [[Unix-like]] systems, such as [[Samba software|Samba]] on Unix, use different{{clarify|date=December 2016}} mangling systems to map long filenames to DOS-compatible filenames (although Samba administrators can configure this behavior in the config file).<ref>{{cite book |last= Eckstein |first= Robert |author2=David Collier-Brown |author3=Peter Kelly |title= Using Samba |url= http://oreilly.com/catalog/samba/chapter/book/ch05_04.html |accessdate= 2009-10-23 |edition= 1st |date= November 1999 |publisher= O'Reilly & Associates, Inc |chapter= 5.4 Name Mangling and Case }} </ref> ==Mac OS== [[macOS]]'s [[Finder (software)|Finder]] displays instances of "[[Colon (punctuation)|:]]" in file and directory names with a "[[Slash (punctuation)|/]]". This is because the [[classic Mac OS]] used the ":" character internally as a path separator. Listing these files or directories using a [[terminal emulator]] displays a ":" rather than the "/" character, though. ==References== {{Reflist}} {{Computer files}} [[Category:Computer file systems]] [[Category:Computer files]]
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)
Pages transcluded onto the current version of this page
(
help
)
:
Template:About
(
edit
)
Template:Cite book
(
edit
)
Template:Clarify
(
edit
)
Template:Computer files
(
edit
)
Template:Main
(
edit
)
Template:Refimprove
(
edit
)
Template:Reflist
(
edit
)
Template:Short description
(
edit
)
Template:Which
(
edit
)