I'm trying to compile some java (learning java currently), and to do so I need to change command-prompt's directory (using javac).
C:\...\Admin> cd D:\Docs\Java
C:\...\Admin> cd
C:\...\Admin
It doesn't change the directory. I try again using quotes:
C:\...\Admin> cd "D:\Docs\Java"
C:\...\Admin>
Again it doesn't change the directory. What am I doing wrong?
You can change directory using this command like : currently if you current working directoris c:\ drive the if you want to go to your D:\ drive then type this command
now your current working directory is D:\ drive so you want go to Java directory under Docs so type below command :
note : d stands for drive
The short answer
The correct way to go from
C:\...\Admin
toD:\Docs\Java
drive, is the following command :More details
If you're somewhere random on your
D:\
drive, and you want to go to the root of your drive, you can use this command :If you're somewhere random on your
D:\
drive, and you want to go to a specific folder on your drive, you can use this command :If you're on a different drive, and you want to go to the root of your
D:\
drive, you can use this command :If you're on a different drive, and you want to go to a specific folder on your
D:
drive, you can use this command :If you're on a different drive, and you want to go to the last open folder of you
D:
drive, you can use this command :As a shorthand for
cd /d d:
, you can also use this command :As @nasreddine answered or you can use
/d
For more help on the
cd
command use: