cmd 文件命令

寻址

cd ..    返回上一级

cd/      返回根目录

cd test          进入 test 文件夹

文件夹

md test       新建 test 文件夹  md 全写 mkdir

md d:\test\new      d盘下新建文件夹

dir                  列出当前目录中所有文件及文件夹

rd test                    删除 test 空文件夹

rd test/s                 删除 test 下的所有文件, 是否确认(Y/N)?

文件

cd.>test.txt              新建 test.txt 文件

type nul>test.txt           新建 test.txt 文件

echo [content]>new.txt      新建非空文件 new.txt,内容为 content 所代替

del test.txt               删除 test.txt 文件

del *.txt                 删除当前目录中所有后缀为.txt的文件

其他

cls           清空当前窗口

d:         切换到D盘符

tree /f        显示树状目录

tree /f >tree.txt  生成树状目录

猜你喜欢

转载自www.cnblogs.com/_error/p/12665442.html