I have Windows XP SP3. From within the command.com window, I want to use the dir command to switch to the child directory "Program Files" which has a space in it. I tried single quotes, double quotes, to no avail. Any clue would be welcome. Thanks.
I guess that the fundamental error is to use the 'dir' command. ;-)
As everybody said implicitly: the cd command should work.
Here's how to achieve the desired with command.com:
C: // switches to drive C: (assuming that your Program Files directory is on C:)
cd \ // changes to the root directory of drive C:
dir /X P* // shows the short 8+3 and the long names of all folders and files in C:\ starting with P*
cd PROGRA~1 // assuming that the short name of Program Files is PROGRA~1
So ypercube is 100% right. Hyphenation does not save you here, because DOS's not UNIX. :-D (Don't even think about masking the space with a backslash.)
I recommend CMD over COMMAND, though. It can handle long file names. Just press WINDOWS+R and enter CMD instead of COMMAND. In CMD, you go
C:
cd \Pro and the -key does some magical auto-completion.