命令提示符不会将目录更改为另一个驱动器 [英] Command prompt won't change directory to another drive

查看:56
本文介绍了命令提示符不会将目录更改为另一个驱动器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试编译一些Java(当前正在学习Java),为此,我需要更改命令提示符的目录(使用javac)。

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?

推荐答案

作为 @nasreddine 回答,或者您可以使用 / d

As @nasreddine answered or you can use /d

cd /d d:\Docs\Java

有关<$ c $的更多帮助c> cd 命令使用:

C:\Documents and Settings\kenny>help cd




显示名称或更改当前目录。

Displays the name of or changes the current directory.

CHDIR [/ D] [驱动器:] [路径]
CHDIR [..]
CD [/ D] [驱动器:] [路径]
CD [..]

CHDIR [/D] [drive:][path] CHDIR [..] CD [/D] [drive:][path] CD [..]

..指定要更改到父目录。

.. Specifies that you want to change to the parent directory.

输入CD drive:显示指定驱动器中的当前目录。
键入不带参数的CD以显示当前驱动器和目录。

Type CD drive: to display the current directory in the specified drive. Type CD without parameters to display the current drive and directory.

除了更改当前
目录外,还使用/ D开关更改当前驱动器。

Use the /D switch to change current drive in addition to changing current directory for a drive.

如果启用了命令扩展,则CHDIR更改如下:

If Command Extensions are enabled CHDIR changes as follows:

将转换当前目录字符串使用与磁盘名称
相同的大小写。因此,如果在磁盘上是这种情况,CD C:\TEMP实际上会将当前的
目录设置为C:\Temp。

The current directory string is converted to use the same case as the on disk names. So CD C:\TEMP would actually set the current directory to C:\Temp if that is the case on disk.

CHDIR命令不会将空格视为定界符,因此可以将
CD放入一个包含空格的子目录名称中,而不会在
的名称两边加上引号。例如:

CHDIR command does not treat spaces as delimiters, so it is possible to CD into a subdirectory name that contains a space without surrounding the name with quotes. For example:

cd \winnt\profiles\用户名\程序\开始菜单

cd \winnt\profiles\username\programs\start menu

与以下内容相同:

cd winnt\profiles\用户名\程序\开始菜单

cd "\winnt\profiles\username\programs\start menu"

如果扩展名被禁用,则必须输入。

which is what you would have to type if extensions were disabled.

这篇关于命令提示符不会将目录更改为另一个驱动器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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