Win XP command line problems

digilink

Gawd
Joined
Jul 27, 2002
Messages
566
Ok, maybe I'm an idiot or this just doesn't plain work, here is what I am trying to do:

I open a new command line window and it defaults me to the root directory of my C: drive. I am trying to access my desktop at c:\documents and settings\username\desktop and when I try to cd to this directory this is what I get:

Code:
C:\>cd doc*
Invalid directory

C:\>cd Documents and Settings
Too many paramaters - and

C:\>cd Documents*
Invalid directory

WTF? I very rarely use DOS anymore, in fact this is a work laptop and I think it is time to install cygwin, at least Linux command line works :D Anyone have any ideas?
 
It'll want the 8 character shortcut for filenames larger than 8 characters. The format is the first 6 characters followed by a ~1. So "Documents and settings" would be "docume~1".

Try "cd docume~1" and see what happens.

Also - cd doc* won't work in dos. The CD command doesn't accept wildcards (the * )
 
Your problem is that you're using the command.exe instead of the cmd.exe, which is the proper command-line in XP. (it has both, but command.exe is the old implementation)

Also, it isn't DOS, so you'er already starting from an incorrect assumption.
 
Also, it isn't DOS, so you'er already starting from an incorrect assumption

That I knew. Thank you for clarifying anyhow :) I was able to succesfully change in to the documents and settings directory, now I am faced with a new problem:

Code:
C:\DOCUME~1>dir
Volume in drive C has no label.
 Volume Serial Number is D099-882C

 Directory of C:\DOCUME~1

10/08/2003  07:52 AM    <DIR>          .
10/08/2003  07:52 AM    <DIR>          ..
10/08/2003  07:38 AM    <DIR>          All Users
07/21/2004  12:06 AM    <DIR>          User
               0 File(s)              0 bytes
               4 Dir(s)   2,884,706,304 bytes free

C:\DOCUME~1>cd all use~1
The system cannot find the path specified.

C:\DOCUME~1>cd all us~1
The system cannot find the path specified.

How do I deal with spacing in the 8 character limitation?
 
Remove the space, and keep the 8 letter limit (6 letters and ~1) so it would be

cd alluse~1

As mentioned above, if you use cmd in windows XP, it allows long file names and spaces and stuff.

Incidently, if you have 2 directories that would be the same first 6 letters - for example

Code:
C:\DOCUME~1>dir
Volume in drive C has no label.
 Volume Serial Number is D099-882C

 Directory of C:\DOCUME~1

10/08/2003  07:52 AM    <DIR>          .
10/08/2003  07:52 AM    <DIR>          ..
10/08/2003  07:38 AM    <DIR>          All Users
07/21/2004  12:06 AM    <DIR>          All Users Again
               0 File(s)              0 bytes
               4 Dir(s)   2,884,706,304 bytes free

All users would be - "cd alluse~1"
All users again would be - "cd alluse~2"

You can probably guess the convention is ~1 for the first instance, and ~2 for the second, yada yada.
 
Also, you can type in: cd "Documents and Settings"

With the quotes. And if you are using cmd.exe you can use tab auto-completion so: cd doc<tab> should do it too.
 
this will save you lots of headaches (besides using cmd)
dir /x
this will display the 8.3 names before the long file names
 
Back
Top