spaces in a directory name in DOS??

loosbrew

Golden Member
Oct 30, 2000
1,336
1
0
hay everyone...is there a way to change to a directory in DOS that has a space in the name of the directory. i know it will work with the 32 bit command prompt in NT or 2k but how about if youre in straight dos? cd\ command doesnt allow me to use a space to identify the name of the dir. any thoughts on this would be appreciated.... thanks


loos
 

AndyHui

Administrator Emeritus<br>Elite Member<br>AT FAQ M
Oct 9, 1999
13,141
17
81
DOS 6.22 won't let you do it.

DOS 7.x and above, use quotes....eg CD\&quot;Program Files&quot;.
 

Ladi

Platinum Member
Apr 21, 2000
2,084
0
0
Give a shot at using &quot; &quot; around the directory name.

~Ladi
 

loosbrew

Golden Member
Oct 30, 2000
1,336
1
0
quotes didnt work...thanks anyway :)

any other suggestion?
thanx for the replies..

loosbrew
 

anton

Banned
Sep 15, 2000
746
0
0
in Dos it just removes all spaces in the directory name, so you better do dir and change to the directory like it says there .... for example I made directory &quot;a b c&quot; and in Dos it was like that : &quot;abc~1&quot;
 

AndyHui

Administrator Emeritus<br>Elite Member<br>AT FAQ M
Oct 9, 1999
13,141
17
81
That's odd....I have no problems using quotes (double quotes) trying to access long name directories. Which DOS are you using?
 

Tom61

Senior member
Aug 16, 2000
200
0
0
When you do a dir do you see the space?

If so, does it look like &quot;director y&quot; or &quot;dir ecto&quot;? If the first, its actually a directory with an extsion, to access it type &quot;cd director.y&quot; The second means a trick was used to get a space in there. One method was to use a null character that looks like a space, to get past that type &quot;cd dir&quot;<alt-0>&quot;ecto&quot; note: you have to hold alt and press 0 on the numeric keypad.

If those don't work, and you do see the space using dir, I have some more tricks that I know.

You might want to give a directory listing so we can tell the directory you're trying access. type the command &quot;dir > it.txt&quot; and paste the contents of it.txt to here.
 

loosbrew

Golden Member
Oct 30, 2000
1,336
1
0
to be quite honest we were trying it through winNT but we were curious about regular DOS. we dont have a PC that has just dos, or can just get into DOS easily so we're lost at this point with all of youre usggestion. i was merely curious to see if there was a known way of doing for future reference! :) thanx again for all of your replies. i know where i can go for accurate info!

thanx for all of the replies. :)
loosbrew