How does 'cd' work

N

noemailplease0001

Below is my command prompt capture

------------------------------------------------------
C:\Documents and Settings\User>cd K:\abc
C:\Documents and Settings\User>
------------------------------------------------------

when I 'cd' to k:\abc why didn't it move to that directory

After the above when I tried to move to K:, I get the below

--------------------------------------------------------------
C:\Documents and Settings\User>cd K:
K:\abc

C:\Documents and Settings\User>
--------------------------------------------------------------

Similarly I tried moving to c: but I get the below

------------------------------------------------------
C:\Documents and Settings\User>cd c:
C:\Documents and Settings\User

C:\Documents and Settings\User>
------------------------------------------------------

Why is this so, due to some other program installation (Visual Studio
etc)?

Thanks,
T K
 
P

Pegasus \(MVP\)

Below is my command prompt capture

------------------------------------------------------
C:\Documents and Settings\User>cd K:\abc
C:\Documents and Settings\User>
------------------------------------------------------

when I 'cd' to k:\abc why didn't it move to that directory

After the above when I tried to move to K:, I get the below

--------------------------------------------------------------
C:\Documents and Settings\User>cd K:
K:\abc

C:\Documents and Settings\User>
--------------------------------------------------------------

Similarly I tried moving to c: but I get the below

------------------------------------------------------
C:\Documents and Settings\User>cd c:
C:\Documents and Settings\User

C:\Documents and Settings\User>
------------------------------------------------------

Why is this so, due to some other program installation (Visual Studio
etc)?

Thanks,
T K

The command

C:\Documents and Settings\User>cd K:\abc

will change the working directory on drive K: to "\abc",
which is invisible to you because your current working
drive is C:. It becomes visible when you change the
working drive to K:, e.g. by typing

C:\Documents and Settings\User>K:

You can change both the working drive and the working
directory with a single command like so:

C:\Documents and Settings\User>cd /d K:\abc

All this is explained in full when you type

cd /?

at the Command Prompt.
 
N

noemailplease0001

The command

C:\Documents and Settings\User>cd K:\abc

will change the working directory on drive K: to "\abc",
which is invisible to you because your current working
drive is C:. It becomes visible when you change the
working drive to K:, e.g. by typing

C:\Documents and Settings\User>K:

You can change both the working drive and the working
directory with a single command like so:

C:\Documents and Settings\User>cd /d K:\abc

All this is explained in full when you type

cd /?

at the Command Prompt.

Thank you, should have tried the help before posting, will do better
next time

Tk
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top