I'm so confused...

crazygal

Senior member
Feb 26, 2002
469
0
0
I'm trying to use dos to get to a certain folder, but I can't seem to go in to some folders with longer names. For example, I wanted to go in to "Documents and Settings" but when I type "cd Documents and Settings" or "cd Documents_and_Settings" it tells me that the directory doesn't exit.

Even "keyprogram" was too much until I renamed it to "key".

How do I go in to those folders with longer names?
I'm using Windows 2000 if it matters.
 

NTB

Diamond Member
Mar 26, 2001
5,179
0
0
leave the cd command outside the quotes: cd "documents and settings"

Nate
 

GroundZero

Diamond Member
Oct 17, 2002
3,669
1
0
dos uses an 8 character naming convention.
to get to your long file/folder names you ahve to truncate the name.
use the first 6 characters of the file/folder name and then ~1 for the last 2 characters.
 

NogginBoink

Diamond Member
Feb 17, 2002
5,322
0
0
None of the DOS commands understand spaces in file or foldernames. To thos commands, a space is the separator between arguments. Therefore, to get "documents and settings" to be interpreted as a single argument, you must put quotation marks around it as others pointed out.
 

crazygal

Senior member
Feb 26, 2002
469
0
0
Uhm, weird.
cd "Documents and Settings" generates this error: Parameter format not correct - "Documents
 

BatmanNate

Lifer
Jul 12, 2000
12,444
2
81
Back in the good ole' days, it would just truncate them and you'd do

cd docum~1

and call it good.
 

damiano

Platinum Member
May 29, 2002
2,322
1
0
Originally posted by: crazygal
Uhm, weird.
cd "Documents and Settings" generates this error: Parameter format not correct - "Documents

do as damiano says then ;)
 

esun

Platinum Member
Nov 12, 2001
2,214
0
0
cd docum~1 doesn't work either

It should be 8 characters long, meaning the first six plus a tilde and a number. This command should work: cd docume~1
 

Ichinisan

Lifer
Oct 9, 2002
28,298
1,235
136
Type...

DIR Docu*

...and it should display the truncated name for you.


I don't know why the quotation marks did not work. Are you working from a boot disk?

You should be able to surround the folder name (NOT the command) in quotation marks if you want to use spaces instead of truncated filenames.

CD "Documents and Settings"
 

crazygal

Senior member
Feb 26, 2002
469
0
0
I'm not working from a bootdisk, just in windows using the command prompt. cd "filename" doesn't work, it's just dumb like that.

Thanks for the dir docu* tip, but it lists "Documents and Settings" rather than the short version.
 

Ichinisan

Lifer
Oct 9, 2002
28,298
1,235
136
DIR should show both versions of the filename if you are not booting from a disk. (or is that only for 9x? Can't check right now).

ducci:
CD \
or
CD\
...should return to the root of the drive without requiring multiple "cd.." commands.
 

Bootprint

Diamond Member
Jan 11, 2002
9,847
0
0

Run a DOS box from the start/run menu and enter 'cmd'

command.com is old school, 8.3 filenames...

cmd.exe is the extended version of DOS with long filenames...

 

Ichinisan

Lifer
Oct 9, 2002
28,298
1,235
136
Wow.

Command.com in Windows XP is more restricted than in Win9x. Win9x command.com allows you to use quotes for long filenames and filenames with spaces and special characters.

Also, WinXP Command.com is strange because the flashing cursor starts in the "invisible/off" status and you can't see it while typing a command.

Why the heck is this strange restricted version of Command.com included with WinXP? It certainly does not maintain backwards-compatibility with these glaring restrictions.
 

Cerb

Elite Member
Aug 26, 2000
17,484
33
86
www.lokai.net
Get console2. Neat looking stuff you can do with it, and it puts the quotes in for you :).
So I can just use
cd documents and settings
and get there.
 

Cerb

Elite Member
Aug 26, 2000
17,484
33
86
Originally posted by: Ichinisan
Wow.

Command.com in Windows XP is more restricted than in Win9x. Win9x command.com allows you to use quotes for long filenames and filenames with spaces and special characters.

Also, WinXP Command.com is strange because the flashing cursor starts in the "invisible/off" status and you can't see it while typing a command.

Why the heck is this strange restricted version of Command.com included with WinXP? It certainly does not maintain backwards-compatibility with these glaring restrictions.

Why use command.com? If it's 2k or XP, you've got cmd.exe
 

Ichinisan

Lifer
Oct 9, 2002
28,298
1,235
136
Originally posted by: Cerb
Why use command.com? If it's 2k or XP, you've got cmd.exe

Lots of batch files and applications try to access the legacy Win9x environment. I'm wondering why Microsoft included command.com if it was not even close to compatible with commands that were valid on Win9x's command.com...
 

ElFenix

Elite Member
Super Moderator
Mar 20, 2000
102,402
8,574
126
Originally posted by: esun
cd docum~1 doesn't work either

It should be 8 characters long, meaning the first six plus a tilde and a number. This command should work: cd docume~1

yup, that'll do it.


windows 2000 doesn't have dos so you weren't using it