1,105,402 Community Members

cannot change directory in cmd.

Member Avatar
apontutul
Light Poster
38 posts since Nov 2006
Reputation Points: 0 [?]
Q&As Helped to Solve: 1 [?]
Skill Endorsements: 0 [?]
 
0
 

hi friends.......i'm using XP sp2....when I open cmd the it shows the current directory ie: "D:\Documents and settings\user>"
which is fine and I was able it change the directory using,
cd e: or CD E:
but from yesterday i'm not able to do that...during that i only reinstalled java i.e jdk & jre 6.0.1 from jdk/jre 5.0.10 and made some changes in the "environment variables". now when I try
it changes to drive E: or F: for a fraction of sec. but then again it changes to the default DIR automatically.
but when try "cd d:\program files" or "cd d:\windows" it works fine.
dont know whats happening.....please help guys

Question Self-Answered as of 6 Years Ago
Member Avatar
nanosani
Technize.net addict
1,764 posts since Jul 2004
Reputation Points: 20 [?]
Q&As Helped to Solve: 58 [?]
Skill Endorsements: 1 [?]
Team Colleague
 
0
 

If you want to go back one directory .. issue the following command:

C:\Documents and Settings\user>cd ..
C:\Documents and Settings>cd ..
C:\>

The thread is already marked as solved but I don't think it has been solved yet ??

Member Avatar
hyliandanny
Newbie Poster
2 posts since Jun 2008
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

This thread has not been solved. What the original poster was trying to do (and what I am trying to do while searching for the same solution) is switch actual drives from the MS-DOS line. Using commands such as:

cd ..
dir

only give us control and viewing of the same drive. We want to go from C:\Program Files\ to D:\other stuff or E:\another drive folder\, not just from C:\Program Files to C:\ or C:\Program Files\World of Warcraft\.

Member Avatar
gerbil
Industrious Poster
4,623 posts since May 2005
Reputation Points: 190 [?]
Q&As Helped to Solve: 338 [?]
Skill Endorsements: 5 [?]
 
0
 

If you wish to change the drive alone to end up in its root, then type
E:
If you wish to change the drive AND specify a directory or file at the same time then type
cd /D E:\"other stuff"
Then when inside the directory "other stuff" you can open a file this_one.fil by typing
this_one.fil
See the D switch? Use the "" when there is a space in the pathname. It could also be this...
cd /D "E:\other stuff"
And I doubt you are using MS-DOS in XP?... it is likely the command line in cmd.exe.
cd .. takes you to the parent of the directory you are in, and is a one-way street ending at the root, with no branching possible.
Also type cd /?

Member Avatar
loveuloads
Newbie Poster
2 posts since Dec 2009
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

to change drive you use sytax "drive letter :"
example "c:\anydir\> d:" move cursor from c:\anydir\ to d:\

Member Avatar
the.one
Newbie Poster
1 post since Jan 2011
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

This will solve your problem:

cd /d <DriveLetter>

Example:
cd /d E:

try it.... ;)

Member Avatar
loveuloads
Newbie Poster
2 posts since Dec 2009
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

ok here is an easy walk through how to change from one directory to an another where the directory is on another drive.

Q: Say you start at c:\windows and need to get too F:\my directory

1: At the cmd prompt type in f: this will change the drive letter to F:\

2: you may not be at the root so may have type cd .. to get back the branch in this case it would be the root of F drive. once there type in cd my directory

You
This question has already been solved: Start a new discussion instead
Post:
Start New Discussion
Tags Related to this Article