Link to home
Start Free TrialLog in
Avatar of lylyvn
lylyvn

asked on

cannot execute cmd chdir

Dear all,

I tried to run cmd command chdir d:\, but nothing happened (could not change to D drive)
Please let me know why.

Many thanks

Regards,

LL
ASKER CERTIFIED SOLUTION
Avatar of workga
workga
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
chdir d:\ just changes the directory of D: to the root - it doesn't change the prompt ro D: unless you specify:-

 chdir /d D:\
Avatar of lylyvn
lylyvn

ASKER

Hi,
Yes I have tried chdir d:, chdir d:\ ----- but could not go to the D drive
Sorry I don't understand Taz' reply.
All I want is to access a folder in D drive.

Many thanks.

LL
I assume we are talking about a windows machine.  If you go to my computer, do you see D drive?
To access D: you simply type:
  D:

You can also type:

   chdir /d d:\ or cd /d d:\

HTH
CHDIR or CD only changes directory on the Current Drive; the /d forces it to change the specified drive and directory...
Avatar of lylyvn

ASKER

Thank you very much. I will try it tomorrow.
There is another alternative:

Try using

pushd d:\

This will change drive and path. Additional you can use popd to return to the last path (prior using pushd) and you're also able to change to UNC locations  (e.g. pushd \\server\share).
Avatar of lylyvn

ASKER

Thank you very much for all your help. Yes it worked with D: or cd /d d:\
Thanks for the share of the points lylyvn...