January 21, 2008

Filename Organization, Part I

Filed under: Main — admin @ 12:01 am

Spaces? Underlines? Hyphens? Periods? Mixed Case? So many choices!

I’m speaking about filenames, of course. Folks new to computers don’t think about these things today, but in days gone by naming a file was an 8-dot-3 ordeal. That 8-dot-3 thing was the old DOS (and Windows) filename format: only 8 characters for the name, plus a dot and optional three character extension. Naming files was hell.

filename.hll

Today you have lots of room to name files; over 200 characters for a filename alone. Extensions can be 3, 4 or more characters. Yes, you can use spaces in a filename, which was pretty much unhead of years back. But spaces aren’t always kosher. There are still instances where typing a filename with a space causes the operating system and other programs to puke.

The solution, of course, is not to use spaces. I find myself avoiding them. (For some reason I keep using the terminal window; spaces at the command prompt present special problems.) In their stead I use one of three alternatives:

The underline. This is the most common replacement for the space, even recommended in some computer books. It works, too: file name becomes file_name, which still carries a similar look. The problem with the underline, however, is that it nearly disappears when the name becomes a link: file_name.

The hyphen. My first choice for replacing a space in a filename is the hyphen. It’s easy to type and it serves a similar visual purpose as the underline: file name becomes file-name. The hyphen is especially useful to me when writing dates in filenames: 1-21-08. Remember that the filename 1/21/09 is illegal because the / (slash) is a pathname separator.

The period. A choice I enjoy playing with is the period. Using a period is tricky, however, because periods traditionally separate the filename from the extension. It’s that extension that the operating system uses to identify the file type — so you have to be careful!

Next issue, I’ll show you some benefits to using such symbols to organize your files.

No Comments

No comments yet.

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.


Powered by WordPress