I am trying to change directory via
cd d:
Doesn't work. I tried other variations of same process but doesn't work. As if command prompt doesn't recognize D drive.
The correct way to go from a random place on your C: drive to the root of your D: drive, is the following command :
cd /d d:\
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 :
cd d:\
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 :
cd d:\path\to\my\folder
If you're on a different drive, and you want to go to the root of your D:\ drive, you can use this command :
cd /d d:\
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 :
cd /d d:\path\to\my\folder
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 :
cd /d d:
As a shorthand for cd /d d:, you can also use this command :
d:
cd \ can be used to change to root of current drive independent on drive letter. And the command cd \path\to\my\folder can be used to change current directory to a specific directory on current drive independent on drive letter relative to root directory. A path starting with \ is relative to root of current drive. A path starting with ..\ references parent directory of current directory. And a path starting with and .\ or none of those 3 strings is relative to current directory.
cd D:\stufffor example). But you are not switching to that drive.cd /d d:\- the/dchanges the drive.