This is not specific to network shared drives. This is the normal behavior of cd
command under windows. You should read the contents of the help notes provided with cd
command. A quote from cd
help notes:
Use the /D switch to change current drive in addition to changing
current directory for a drive.
The syntax you want is
CD [/D] [drive:][path]
This will allow you to cd
to a different drive. If /D switch is not used, you can only change the directory within your current drive.
Another alternative is to explicitly change the drive before issuing cd
command. in your case this would look like this
[drive:]
CD [path]
First line will change the drive to whatever drive you want, use Z: in your case (note no backslash after column), second line will change directory to [path]
Your question doesn't make sense. What is a mapped drive to a remote drive? Do you mean a mapped drive to a remote Share? Have you tried simply running
CD Z:
? How about runningnet use
? Do you see the Z: drive? – joeqwerty – 2014-06-16T14:46:12.117I can see the remote drive. running CD Z: outputs the text "Z:" and that's it. – avorum – 2014-06-16T14:47:46.067
have you typed 'dir'? – Frank Thomas – 2014-06-16T14:49:18.903
well, like i said, the CD command didn't do anything. If I run 'dir' after trying to CD it still returns the contents of my home folder. – avorum – 2014-06-16T14:51:13.327
type z: without the backslash and hit enter – Frank Thomas – 2014-06-16T14:52:28.553
Type
Z:
at the command prompt and hit enter. You should then be in the Z: drive. Typedir
to confirm that the directory contents are those of the Z: drive. – joeqwerty – 2014-06-16T14:54:06.080Just type
Z:
, nocd
and no slash. Thecd
command is for changing directories not drives. – Jason C – 2014-06-16T15:25:40.950Its worth noting that powershell does CD to other drives in one operation. I don't tend to use cmd.exe much anymore, since PS is just generally better and it recognizes standard bash FS commands like ls. – Frank Thomas – 2014-06-16T15:27:53.433