如何获取没有文件的文件夹和子文件夹列表? [英] How do I get a list of folders and sub folders without the files?
本文介绍了如何获取没有文件的文件夹和子文件夹列表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试将目录的文件夹和子文件夹的列表打印到文件中.
I am trying to print a list of the folders and sub folders of a directory to a file.
当我运行 dir/s/b/o:n >f.txt
,我也得到了文件列表.我只需要文件夹和子文件夹.
When I run dir /s/b/o:n > f.txt
, I get a list of the files also. I only need the folders and sub folders.
有人知道这可以从命令行界面执行此操作吗?
Anyone know is this possible to do this from command line interface?
推荐答案
试试这个:
dir /s /b /o:n /ad > f.txt
这篇关于如何获取没有文件的文件夹和子文件夹列表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文