如何使用Windows命令行更改目录 [英] how to change directory using Windows command line

查看:69
本文介绍了如何使用Windows命令行更改目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 cmd.exe (C:\WINDOWS\System32\cmd.exe),必须将当前目录更改为 D:

当我尝试 $ 时,没有任何反应。

p>

  C:\> cd D:\temp 

C:\>

我不知道在这里还能做什么。即使按下 tab 键也不会给出任何提示。直到现在,我一直没有理由使用cmd.exe。我主要使用Linux进行开发。



如果这样做有帮助:我正在远程登录另一台计算机,并且 D:\temp 放在远程计算机上,但是 C:\ 也是如此,我在其中打开了终端(cmd.exe)。

解决方案

cd命令更改目录,但不更改您正在使用的驱动器。因此,当您进入 cd d:\temp时,您正在将D驱动器的目录更改为temp,但保留在C驱动器中。



执行以下两个命令:

  D:
cd temp

这将为您提供所需的结果。


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).

解决方案

The "cd" command changes the directory, but not what drive you are working with. So when you go "cd d:\temp", you are changing the D drive's directory to temp, but staying in the C drive.

Execute these two commands:

D:
cd temp

That will get you the results you want.

这篇关于如何使用Windows命令行更改目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆