How does 'cd' work

  • Thread starter Thread starter noemailplease0001@gmail.com
  • Start date Start date
N

noemailplease0001@gmail.com

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
 
<noemailplease0001@gmail.com> wrote in message
news:f24aacfc-ffc3-4fa1-b901-82c044d81001@e23g2000prf.googlegroups.com...
> 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.
 
On Dec 28, 7:06 am, "Pegasus \(MVP\)" <I....@fly.com.oz> wrote:
> <noemailplease0...@gmail.com> wrote in message
>
> news:f24aacfc-ffc3-4fa1-b901-82c044d81001@e23g2000prf.googlegroups.com...
>
>
>
> > 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.


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

Tk
 
Back
Top