• Welcome to Overclockers Forums! Join us to reply in threads, receive reduced ads, and to customize your site experience!

winXP command line - change directory

Overclockers is supported by our readers. When you click a link to make a purchase, we may earn a commission. Learn More.

kajj

Member
Joined
May 27, 2002
Location
Mobile, AL
i'm having trouble doing the simplest thing using the winXP console:

when any directories have a space in them ( " My Documents" ), i am unable to change directories:

07/07/2002 05:45 PM <DIR> My Documents

...

C:\DOCUME~1\WILLIAM>cd My Documents
Too many parameters - Documents

or

C:\DOCUME~1\WILLIAM>cd "My Documents"
Parameter format not correct - "My

the help command says that
CHDIR command does not treat spaces as delimiters, so it is possible to
CD into a subdirectory name that contains a space without surrounding
the name with quotes. For example:

cd \winnt\profiles\username\programs\start menu

is the same as:

cd "\winnt\profiles\username\programs\start menu"

which is what you would have to type if extensions were disabled.

so i would think either one of the two methods i tried above would work.

any ideas?

thanks
 
If you're referring to the Command Prompt from within Windows, and not the Recovery Console...when you first open the Command Prompt, you should be greeted with:

C:\Documents and Settings\William>

If you want to change directories to My Documents, you would type...

>cd My Documents (the caps aren't necessary) to end up with...

C:\Documents and Settings\William\My Documents>

If you're referring to the Recovery Console, you can use only the following folders:
  • The root folder
  • The %SystemRoot% folder and the subfolders of the Windows installation that you're currently logged on to
  • The Cmdcons folder
  • Removable media drives such as CD-ROM or DVD-ROM drives
If you try to obtain access to other folders, you'll receive an "Access Denied" error message. Also, while you're using the Windows Recovery Console, you cannot copy a file from the local HDD to a floppy disk. You can copy a file from a floppy disk or from a CD-ROM to a HDD, and from one HDD to another HDD.

This is how you would be able to use the cd or chdir commands from the Recovery Console...

Type cd .. to change to the parent folder.
Type cd drive: to display the current folder in the specified drive.
Type cd without parameters to display the current drive and folder.
The chdir command treats spaces as delimiters. Because of this, you must put quotation marks ("") around a folder name that contains a space, for example:
cd "\windows\profiles\username\programs\start menu"
The chdir command works only in the system folders of the current installation of Windows, in removable media, in the root folder of any HDD partition, or in the local installation sources. ;)
 
Back