Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
400 views
in Technique[技术] by (71.8m points)

windows - 用于列出文件夹中的所有文件以及Windows中的子文件夹的命令(Command to list all files in a folder as well as sub-folders in windows)

I tried searching for a command that could list all the file in a directory as well as subfolders using a command prompt command.

(我尝试使用命令提示符命令搜索可以列出目录中的所有文件以及子文件夹的命令。)

I have read the help for "dir" command but coudn't find what I was looking for.

(我已阅读“dir”命令的帮助但却找不到我要找的东西。)

Please help me what command could get this.

(请帮助我什么命令可以得到这个。)

  ask by user1760178 translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

The below post gives the solution for your scenario.

(以下帖子为您的方案提供了解决方案。)

dir /s /b /o:gn

/S Displays files in specified directory and all subdirectories.

(/ S显示指定目录和所有子目录中的文件。)

/B Uses bare format (no heading information or summary).

(/ B使用裸格式(无标题信息或摘要)。)

/O List by files in sorted order.

(/ O按排序顺序按文件列出。)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...