I'm using cmd.exe
(C:\WINDOWS\System32\cmd.exe) and I have to change my current directory to "D:\temp" i.e. temp folder in the D drive.
When I try to cd
nothing happens.
C:\> cd D:\temp
C:\>
I don't know what else to do here. Even pressing tab
key does not give any hints. I have never got the reason to use cmd.exe until now when I have to. I mostly use Linux for development.
If this helps: I'm on a remote login to another computer and D:\temp
in on the remote machine, but so is C:\
where I have opened the terminal (cmd.exe).
This question is related to
windows
command-line
cmd
command-prompt
Just type your desired drive initial in the command line and press enter
Like if you want to go L:\\ drive,
Just type L: or l:
cd
has a parameter /d
, which will change drive and path with one command:
cd /d d:\temp
( see cd /?
)
Another alternative is pushd
, which will automatically switch drives as needed. It also allows you to return to the previous directory via popd
:
C:\Temp>pushd D:\some\folder
D:\some\folder>popd
C:\Temp>_
cd /driveName driveName:\pathNamw
Source: Stackoverflow.com