[go: nahoru, domu]

File format: Difference between revisions

Content deleted Content added
m Rollback edit(s) by 197.185.99.144 (talk): non-constructive (RW 16.1)
Un1Gfn (talk | contribs)
Tag: Reverted
Line 27:
One popular method used by many operating systems, including [[Microsoft Windows|Windows]], [[macOS]], [[CP/M]], [[DOS]], [[OpenVMS|VMS]] and [[VM (operating system)|VM/CMS]] is to determine the format of a file based on the end of its name, more specifically the letters following the final period. This portion of the filename is known as the [[filename extension]]. For example, [[HTML]] documents are identified by names that end with {{Mono|.html}} (or {{Mono|.htm}}), and [[GIF]] images by {{Mono|.gif}}. In the original [[File Allocation Table|FAT]] [[file system]], file names were limited to an eight-character identifier and a three-character extension, known as an [[8.3 filename]]. There are only so many three-letter extensions, so, often any given extension might be linked to more than one program. Many formats still use three-character extensions even though modern operating systems and application programs no longer have this limitation. Since there is no standard list of extensions, more than one format can use the same extension, which can confuse both the operating system and users.
 
One artifactdefect of this approach is that the system can easily be tricked into treating a file as a different format simply by renaming it—an [[HTML]] file can, for instance, be easily treated as [[plain text]] by renaming it from {{Mono|filename.html}} to {{Mono|filename.txt}}. Although this strategy was useful to expert users who could easily understand and manipulate this information, it was often confusing to less technical users, who could accidentally make a file unusable (or "lose" it) by renaming it incorrectly.
 
This led most versions of Windows and Mac OS to hide the extension when listing files. This prevents the user from accidentally changing the file type, and allows expert users to turn this feature off and display the extensions.