MD 和 MKDIR 批处理命令有什么区别?
What is the difference between MD and MKDIR batch command?
这两个命令都会创建文件夹。我 read MKDIR 甚至可以创建子文件夹。
- 仅此而已吗?
- 为什么有两个命令做同样的事情?
- 我应该使用哪一个?
只是别名相同 command.Here 是帮助信息:
C:\>md /?
Creates a directory.
MKDIR [drive:]path
MD [drive:]path
和
C:\>mkdir /?
Creates a directory.
MKDIR [drive:]path
MD [drive:]path
If Command Extensions are enabled MKDIR changes as follows:
MKDIR creates any intermediate directories in the path, if needed.
For example, assume \a does not exist then:
mkdir \a\b\c\d
is the same as:
mkdir \a
chdir \a
mkdir b
chdir b
mkdir c
chdir c
mkdir d
which is what you would have to type if extensions were disabled.
除了@npocmaka的,我想提供一个所有这些别名的列表,仅供参考:
cd = chdir
md = mkdir
rd = rmdir
ren = rename
del = erase
在Linux/Unix/MacOS上,mkdir
很像,但是md
没什么意思。如果你想要跨平台的东西,你应该使用 mkdir
.
这两个命令都会创建文件夹。我 read MKDIR 甚至可以创建子文件夹。
- 仅此而已吗?
- 为什么有两个命令做同样的事情?
- 我应该使用哪一个?
只是别名相同 command.Here 是帮助信息:
C:\>md /?
Creates a directory.
MKDIR [drive:]path
MD [drive:]path
和
C:\>mkdir /?
Creates a directory.
MKDIR [drive:]path
MD [drive:]path
If Command Extensions are enabled MKDIR changes as follows:
MKDIR creates any intermediate directories in the path, if needed.
For example, assume \a does not exist then:
mkdir \a\b\c\d
is the same as:
mkdir \a
chdir \a
mkdir b
chdir b
mkdir c
chdir c
mkdir d
which is what you would have to type if extensions were disabled.
除了@npocmaka的
cd = chdir
md = mkdir
rd = rmdir
ren = rename
del = erase
在Linux/Unix/MacOS上,mkdir
很像,但是md
没什么意思。如果你想要跨平台的东西,你应该使用 mkdir
.