What is the difference between MD and MKDIR batch command?

谁都会走 提交于 2019-12-02 21:02:13

Just aliases of the same command.Here are the help messages:

C:\>md /?
Creates a directory.

MKDIR [drive:]path
MD [drive:]path

and

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

In addition to @npocmaka's answer, I want to provide a list of all such aliases, just for reference:

cd   =  chdir
md   =  mkdir
rd   =  rmdir
ren  =  rename
del  =  erase
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!