命令 Dir /b > DocTree.txt 新建文本文件,将上述命令复制到新建的 txt 文件中,修改文件格式为 bat 。执行该 bat 文件后,会生成一个 DocTree.txt 文件,该文件中显示了文件的目录树。