如何获取没有文件的文件夹和子文件夹的列表? [英] How do i get a list of folders and sub folders without the files?

查看:86
本文介绍了如何获取没有文件的文件夹和子文件夹的列表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将目录的 文件夹 子文件夹 的列表打印到文件中

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆