Why Spaces Are Bad

Spaces in paths are the root of all evil, sowing confusion and disinformation wherever they appear. I'm going to show you why.

To keep it simple, I'm using the command line, so anyone with a PC should be able to follow along...

Let's open a "DOS Box". From the Start Menu, select Accessories > Command Prompt.

The window opens in C:\Documents and Settings\your login ID

We'll enter cd.. a couple of times to get to the root of the C: drive.

Now let's enter a command:
dir is a command which lists the files in a directory.

We see a list of the files and directories on the C: drive.

But what if we want to look at the contents of a different folder? Commands can take "arguments" which allow us to be specific about what we want done. You can tell dir which folder you want to see the contents of.

If we type dir Windows, we'll get a list of the files in the Windows folder. But look at what happens when we type dir Program Files and hit return:

We asked for the contents of Program Files and got nothing! That's because the evil space between the words Program and Files confused the dir command. It expected a single argument to tell it which folder to look in and we gave it two!

To get around this, we have to use quotes:

If we hit return now, we'll get a full listing of the contents of the Program Files folder.

So, how does this affect LightWave? I'll show you in Part 2.


(c) Simon Coombs Setup Main Page Created: 26 July 2006