我用以下代码编写了批处理文件tree.bat
:
set output_loc=Z: set loc=Z: chdir /d %loc% & tree /f > "%output_loc%\tree.txt"
假设驱动器Z:具有以下树
foo1 file1 file3 file3 foo2 file1 file2 tree.bat foo1 file1 file2 file3
当我运行tree.bat时,我在Z:\ tree.txt
中得到以下输出Folder PATH listing for volume storage1 Volume serial number is C508-09ED Z:. file1 file2 tree.bat No subfolders exist
如何获得整棵树?