# 'Space' In DOS



## ABSTRAX (Aug 6, 2003)

Kind of a simple question...

I'm using the chdir command in DOS, but I'm unable to change to my Program Files directory, due to their being a space in the path name

So, can anyone help me with what I should put in place of the blank that is currently there?


Thanks!


----------



## brushmaster1 (Jun 15, 2002)

The directory will be PROGRA~1

Dos truncates long file names, using the first six letters, then a tilde(~), then a number, starting with 1. If you had two directories beginning with PROGRA, the second one would be PROGRA~2 and so on...

Another way to find out the shortened DOS filename for a file or folder is to use the DIR command. The file or folder will show with the shortened name.

From within Windows, you can use File Manager to view shortened file names. Just go to START > RUN, and type WINFILE


----------



## Strahan (Aug 19, 2003)

Also if you goto DOS under your Windows environment and do dir /x it will show short names.


----------



## plejon (Jul 26, 2001)

Another alternative is to put the name of the directory in quotes:


cd "program files"


----------

