0

I have tried

cd E:
cd "E:\android\webrtc_tutorial"
cd ..

However, i noticed that cd .. will successfully go up a directory. But I still cant change it to E drive. or the desired directory. (see pic2)

enter image description here pic 2

phuclv
  • 37,963
  • 15
  • 156
  • 475
Saad Mansoor
  • 199
  • 7
  • duplicates: [CMD cd to other drives except C: not working](https://superuser.com/q/302505/241386), [Using cd command in Windows command line, can't navigate to D:](https://superuser.com/q/135214/241386), [Command prompt won't change directory to another drive](https://stackoverflow.com/q/11065421/995714), [Change directory via cmd.exe doesn't work](https://stackoverflow.com/q/34167650/995714) – phuclv Jan 17 '23 at 10:06
  • you guys are right. but i saw that post also, and disregarded that considering its about java or javascript, not cmd. my question is different in this sense that it Specifically asks about 'cmd' instead of blotting question with python/javascript code, like other posts. – Saad Mansoor Jan 17 '23 at 12:01
  • that has nothing to do with Java. Did you even read the question? – phuclv Jan 17 '23 at 12:59

2 Answers2

2

That's a common weird thing with cmd. to change drive, just write the drive path and ':' to cd into it. for example. to cd into E drive, write in the cmd:

E:

and then press enter.

CsgoHost
  • 36
  • 1
  • 3
    it's not weird at all. It's just because DOS has multiple different working directories for different drives and cmd does that for maintaining backward compatibility. [Why does each drive have its own current directory?](https://devblogs.microsoft.com/oldnewthing/20101011-00/?p=12563) – phuclv Jan 17 '23 at 10:02
2

Also you can use the cd '/d' option which allows you to change the current drive , so to go from C:\Users to E:\android\webrtc_tutorial

You would write: cd /d E:\android\webrtc_tutorial

Ietu
  • 823
  • 2
  • 9