
3-character filename extensions - fidz
http://warp.povusers.org/grrr/short_filename_extensions.html
======
bodyfour
First, the 3-character file extension predates CP/M. It goes at least as far
back as various DEC operating systems like RT-11 and RSTS/E; probably there
are antecedents further back in time. I've also seen old filesystems with
2-character extensions, but 3 has been common for quite some time.

I think that the original selection of 3 character extensions was made because
it felt like a comfortable number of characters to make something meaningful
while not being too burdensome to type. The fact that we still tend towards <=
3 character extensions is probably because this is still true, not because of
a conscious attempt to maintain DOS compatibility.

~~~
Alupis
I've only ever seen Windows-based systems adhere strictly to the 3-character
extension. All 'Nix's I've worked with (Linux, BSD's, etc) usually have native
files on the system with extensions longer than 3 characters. (.conf anyone?)

Also, probably should note, file extensions are largely a Windows-based OS
thing as well. On the 'Nix's, an extension isn't really needed (OK, it's not
needed on Windows-based OS's either, but the OS prefers it). the "file"
command will tell you all you need to know about a file without an extension.
Or, you can just open it with a text editor. Or, execute it if it has execute
permissions, etc.

So, it seems, the 3-character extension (or extensions at all) are really a
Windows-Based OS thing.

(While we're at it, Windows-Based OS's are the only OS's I've worked with that
actually _require_ something in-front of the "."! For example, try to natively
create a ".somefile" on Windows -- it will complain and not let you).

~~~
ppog
Windows has allowed extensions longer than 3 characters for about 20 years
now. I'm not sure what you mean by "natively create" but it also definitely
doesn't require anything before the "." \-- e.g. I have files called
".gitignore" etc. just as on any other OS.

~~~
dahdum
Right click a text file (such as "example.txt") and try to rename to
".gitignore". You get an error popup dialog "Rename: You must type a file
name."

That's what he means...you can create it in various applications though.

~~~
lucb1e
That is the most annoying error ever. _No, I must not! I shall decide for
myself what I must and mustn 't do!_ /me opens cmd.exe and uses ren
untitled.txt .gitignore

A slightly bigger challenge is a file named CON :)

~~~
nik41tkins
Or .... , but that one is fairly easy as long as you COPY from the CONsole to
a <fileName>. And remember ^Z to save and quit.

------
informatimago
Even if MS-DOS wasn't used anymore, the various MS-DOS file systems are still
used; a lot of media comes from the vendor pre-formated in FAT16. Phones,
cameras, USB hard disks, etc are all formatted in FAT by default. Even the
file system on Spirit and Opportunity, the Martian rovers, is FAT16! ( See
page 6 of
[https://www.cs.princeton.edu/courses/archive/fall09/cos109/m...](https://www.cs.princeton.edu/courses/archive/fall09/cos109/mars.rover.pdf)
)

By default MacOSX doesn't read Linux file systems (EFS, ReiserFS, etc); by
default Linux doesn't read MacOSX file systems (HFS, HFS+). On the other hand,
by default, most system read FAT16 or sometimes FAT32 file systems.

Therefore if you want to use those amovible media to exchange data accross
file systems, you better stick to those MS-DOS file systems. Granted, you
could use MS-Windows extensions, but again, nothing guarantees that the system
where you will plug your USB key will have a system understanding those
extensions. In all probability, it will have FAT16 or FAT32 support, ie. 8.3
file names.

~~~
to3m
It's been a very long time since I saw something that doesn't support FAT32,
and probably even longer than that since I saw something that didn't support
LFN. Windows '95 was 19 years ago. People have had plenty of time to switch,
and it seems that they all have. Which is hardly surprising, because 8.3 file
names were annoying, and everybody hated them.

(Any stragglers can simply be ignored; people still stuck on DOS are even less
important in the grand scheme of things than people still using the Amiga...)

------
jeffreyrogers
I don't really see an argument in favor of longer extensions except in rare
cases (such as with html where you only need one extra letter). `mp4` tells me
just as much about a file as `mpeg4` does and is equally easy to remember,
plus it saves a few keystrokes.

The same logic applies to most programming languages. I have no problem
remembering `.js` is javascript or `.rs` is rust. And I think the vast
majority of programmers would agree with me.

Further, filenames don't play a large role in most (nontechnical) users lives.
The tools they use (e.g. Word or Excel) append the filename for them, so they
don't worry about it at all. The only people who routinely write filenames by
hand are coders and they're familiar enough with the extensions that shortcuts
work fine.

~~~
freshyill
_oldmanyellsatcloud.gif_

But seriously, it's a silly limitation from a bygone era. Why _should_ we
adhere to it?

Why should we _have_ to remember these things? Some of them are easy to
remember, but even less technical users change their workflows from time to
time.

Sketch uses ".sketch" as its extension. Should they have gone with something
".skc" as their extension, just because that's *the way things are done?",
even though the application only runs on the latest version of an operating
system without that primitive limitation?

Even with Markdown, most people use ".md", but Gruber has expressed
".markdown" as his preference because the limitation doesn't really exist.

~~~
Gigablah
Why should we even have extensions in the first place?

Ideally the filetype should be determined from metadata or scanning the
header.

(Speaking as someone who's had to fix image file processing bugs because the
original coder trusted file extensions to be correct.)

~~~
bluedino
And this is how the Mac has worked for a long time.

------
sheetjs
FWIW the 2007+ office file extensions are all more than 3 characters (e.g.
ACCDB, ACCDT, DOCX, DOCM, DOTX, DOTM, XLAM, PPTX, PPTM, POTX, POTM, PPAM,
PPSX, PPSM, SLDX, SLDM, XLSX, XLSM, XLTX, XLSM, XLSB)

------
chime
Abbreviations are convenient. I'd rather type .psd than .photoshop or .m than
.module.

~~~
shitgoose
.m is just as much a Matlab file, as a module. Speaking of Matlab, .mat
extension is reserved by Access somehow deep in Windows guts and up until this
day I don't know how to get rid of it.

------
ChuckMcM
Heh, no respect for history. Short answer, while UNIX had its 'magic' number
which looked at the first 32 bits (four bytes) of a file to figure out what
kind it was (hash bang for the win) and Apple had its own awesomesauce of a
'forked' file system where the file and what it was were in two completely
separate but extensible parts of the file system, CP/M (which had emulated
DEC) and then DOS which had emulated CP/M used a 3 character (which is only 24
bits but still plenty) to encode the type of file in the name since it
couldn't necessarily live in the file itself and there was no 'attribute fork'
to stick it in.

Interestingly this is a problem that lives on, people still want to identify
_what_ a file is and that requires some sort of identifier. Embedding it in
the name is just as good as anything, but the important bit is that you stay
consistent. If you're web documents are .htm, .html, .www, .web, etc your
configuration gets unwieldy.

~~~
kabdib
I really liked the Mac "forked" file system. File types and bundles were
simple and worked really well. They also facilitated "drag and drop"
application installs, where the Finder did most of the work keeping track of
where applications lived.

The app install process on Windows makes me weep (I think that Visual Studio
installs well over 10,000 keys in the registry. What the hell? This number
should be _zero_ in a well designed system . . . but don't get me started on
the disaster that is COM).

Incidentally, Windows NT has file forks. They're not often used, and lots of
utilities don't know about them, but they can be quite useful.

------
magnetikonline
If you were going to go the whole hog, slap the entire MIME type name in the
extension :) Otherwise I don't think 3-4 character file extensions have really
let anyone down in the history of computing.

------
lucb1e
> Perhaps the only, quite unusual, exception is the .html file name extension
> for HTML files

Sounds like he has been missing out on Microsoft Office since at least 2007,
though I must say I can only applaud that fact.

More seriously, the article might as well have ranted about files having any
extension at all. Magic mime is much more reliable and versatile, not to
mention all the viruses using .jpg.exe extensions.

~~~
phkahler
.jpg.exe extensions are less of a problem when the operating system doesn't
hide them.

~~~
lucb1e
Heh, that too. I keep saying "first thing I do when" because there's so much
to do when installing Windows even if it's not for myself (nowadays Windows
installs are, luckily, never for myself), but it really is one of the first
things.

~~~
dm2
The "hide known file extensions" default option should have been around less
than a month before someone realize, "this is very insecure". The fact that
it's been around for over a decade is just lame.

------
korzun
Article is from 2010. For the same reason you want shorter domain names,
people want shorter extensions.

Decade later you can see that there a greater amount of 4+ characters
extensions.

>
> [http://en.wikipedia.org/wiki/List_of_file_formats](http://en.wikipedia.org/wiki/List_of_file_formats)

~~~
lucb1e
> For the same reason you want shorter domain names

Good one, hadn't thought of the analogy to .commercial, .network and
.organization yet (.com, .net and .org, incase anyone doesn't get it). It's
2014, let's use the whole name already!

------
thathonkey
If it ain't broke, don't fix it. (The reasons for why it is "broken" to limit
to 3-char in the article aren't good enough to warrant a paradigm shift for a
convention almost as old as computing itself).

------
kourt
One of my biggest disappointments with Gnumeric is the file extension: tab
completion only works sometimes, and I'd really like to change find ~ -name \
_.gnumeric to find ~ -name \_.gnm or find ~ -name \\*.gsc Also it takes up
more space when listing files in a terminal.

Also, the 3 letter convention is a somewhat helpful limitation in the same way
that countries defining which side of the road to use is actually helpful. For
instance, it is nice to have all of my JPEGs ending in .jpg rather than a mix
of .jpg, .jpeg, .JPG .JPEG.

------
vbrendel
The .html 'exception' shouldn't really be that surprising. How many web
servers do you know that run on MS-DOS?

~~~
boomlinde
The "htm" extension was a lot more common back when some consumer systems
still had the three character limit. The web server limitations don't matter
that much on something like a web hotel where users typically FTP their files
over from whatever OS they are using themselves.

------
orbitingpluto
The only reason to make a file extension longer is to avoid collisions.

NTFS has a file length limit fo 255 characters. And if the company you work
for does things like this:

\\\SERVER1\Data\Region\SubRegion\SubSubRegion\Reports\Weekly\2014-25\WidgetReport\SubWidgetReports\\.....
you can eat up space pretty quickly. You might need those extra characters.

~~~
chc
Just a little nit that I feel compelled to pick: The path length limitation is
part of Windows, not NTFS. NTFS has a 255-character limit on individual path
components, but it allows for much longer paths than that, just like all
modern filesystems do. It's the Windows API that sets MAX_PATH to 260.

~~~
orbitingpluto
Feel free to nitpick. I remember writing to an NTFS parition from Linux. I
finally managed to delete the unresponsive directories in Powershell except
for one straggler which also had special characters.

------
irysius
.html isn't quite served exactly the same way as .htm on a Windows OS.
Although both .html and .htm will open up a page in your default browser, the
latter will attempt to locate predefined folders that presumably contains
images/scripts for your .htm file.

------
nikatwork
Three letter extensions can also be important for compatibility with poorly-
written software. I work with an "enterprise" (hah) document management system
which refuses to believe that .docx files are a thing.

