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按排序顺序按文件列出。)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…