0
我正在尝试为特定级别的特定文件夹集创建目录树。我发现如何限制使用正则表达式的Tree
结果,但我不确定如何限制生成的树只能说第一级目录,而不是递归查找所有子目录。在分层级别创建目录树
在Linux中,可以使用tree -L 1
将结果限制为第一级。我如何在Windows cmd中执行此操作?
例 - 如果我的文件夹目录如下:
Folder A
Folder B
Folder C
Folder D
Folder E
我想我的树结果为:
--Folder A
----Folder B
--Folder D
----Folder E
(只显示2级)
的Tree
帮助如下:
Graphically displays the folder structure of a drive or path.
TREE [drive:][path] [/F] [/A]
/F Display the names of the files in each folder.
/A Use ASCII instead of extended characters.