Filename extensions can cause problems

Most people don’t really give much thought to the idea of file extensions, although they’re nearly universally in the minds of modern computer users.  Users have come to understand that .pdf means a file is in the Portable Document Format, or that .ppt is a Microsoft PowerPoint file.  DOS users recall that files ending in .exe, .com, or .bat are executable. For those unknown extensions, there’s the very helpful filext.com website.  There’s no doubt that filename extensions can provide very helpful information, but here’s the issue: not all platforms care about them.  That’s not a problem in all cases, but there are times when it makes life miserable.

Filename extensions can be just another part of the filename, or they can be entirely separate namespace.  DOS first introduced the idea of extensions to the general public.  In those days, the file had a name of up to eight characters, and an extension of up to three.  This “8.3”  convention persisted into Windows, and is still commonly seen on Windows system files, even though it is no longer necessary.  Unix-based systems, such as Mac OS X and Linux, have no feelings about extensions — they’re certainly not required, but some applications make use of them.  The dominance of Windows in the desktop market has encouraged application writers to really care about extensions, and it does help in trying to find the right type of files.

Here’s where it becomes problematic.  Because some systems don’t care about extensions, it’s easy to not have extensions on your filename.  Then, when you go to a system that does care, things don’t work as you expected.  Here’s a fine example: my wife needed to have a few pictures printed, so she loaded them onto an SD card and took them to the store. When she got there, the photo system would not find any of the pictures.  As it turns out, she had saved them without the .jpg extension, so while they were valid JPEG files, the system didn’t try to load them.

Now, most photo software, cameras, etc. will add the extension out of tradition (and because that’s what people expect). However, a manual renaming of the files after the fact could result in absent extensions.  So what is the solution?  Well, we’ll never get all platforms to come to agreement on what filename extensions are, and how they should be defined and treated.  The only answer, then, is that applications should be written to not focus on extensions, but on the contents of the file.  If applications used methods similar to the Unix file command to determine file type, then such problems could be avoided.

3 thoughts on “Filename extensions can cause problems

  1. I agree. The Windows shell itself is even bad at this sometimes, and it even tries to provide thumbnails. If you can read the first however many bytes to draw a thumbnail, you should probably be able to tell me that I’m looking at a jpeg or a word doc, and not say “sorry, can you pick a program to open files of type ‘.2009′”. Eh.

    On the other hand, it’s now habit that I type the extension for everything, regardless of whether or not the program even looks like it might add the extension. I don’t trust any program to do it right since so many don’t agree (and as a result, I can’t open things easily). Grrr.

    I’m convinced that computers suck.

  2. Matt, I agree-ish. Computers don’t suck, but they can be a cruel mistress (or mister). I do tend to force extensions on my files, for the same reason you do. Since most modern, mainstream systems are fairly agnostic about the whole issue, it would be nice if a standard could be set and agreed upon, but I think it is far too late to put a lid on this particular Pandora’s box.

Leave a Reply

Your email address will not be published.