View Full Version : How does 'cd' work
December 28th 07, 02:57 PM
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
Pegasus \(MVP\)[_34_]
December 28th 07, 03:06 PM
> wrote in message
...
> 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.
December 28th 07, 03:29 PM
On Dec 28, 7:06 am, "Pegasus \(MVP\)" > wrote:
> > wrote in message
>
> ...
>
>
>
> > 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
vBulletin® v3.6.4, Copyright ©2000-2024, Jelsoft Enterprises Ltd.