in DOS prompt of Win2k, how do i change to directories containing spaces?

Maximus96

Diamond Member
Nov 9, 2000
5,388
1
0
i can't CD to directories with a space in the name...how do i get around that?
 

Kelemvor

Lifer
May 23, 2002
16,928
8
81
just type the spaces. it should work. At least it works in XP. Otherwise use the first characters followed by a ~1, ~2, ~3 etc.

dir /x should show the shortened names...
 

Vic

Elite Member
Jun 12, 2001
50,422
14,337
136
Old 16 bit DOS style still works as well. Yaknow, C:\PROGRA~1\MICROS~2
 

CQuinn

Golden Member
May 31, 2000
1,656
0
0
put the directory name in quotes.

CD "This directory has spaces in the name"

 

Electrode

Diamond Member
May 4, 2001
6,063
2
81
If spaces don't work, put quotes around it.

cd "C:\Documents and Settings\Administrator\Desktop"

On *NIX you'd use escapes.

cd /Documents\ and\ Settings/root/Desktop
 

Beau

Lifer
Jun 25, 2001
17,730
0
76
www.beauscott.com
To get the the non 8-dot-3 name of the file or directory, at the command prompt, type:

c:\> dir /x

use the 3rd column info to access your file or directory:

c:\> cd mymusi~1

 

Maximus96

Diamond Member
Nov 9, 2000
5,388
1
0
how about renaming file extensions in windows explorer? when i do rename, it'll just be file.new extention.old extention. thats why i had to go to dos prompt to do it in the first place.