1、新建批处理命令list.bat,内容如下: dir/b/on >list.txt 2、将list.bat文件放到当前目录下。 3、运行得到list.txt文件。 转载于:https://www.cnblogs.com/hutz/p/10669275.html