1,首先,同时按下键盘上的win+r键,输入“cmd”,然后按下回车,打开命令行窗口。
![](https://video.ask-data.xyz/img.php?b=https://iknow-pic.cdn.bcebos.com/00e93901213fb80efa92bac639d12f2eb9389464?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto)
2,打开命令行之后,利用“cd”命令,将命令行的路径跳转到指定的文件夹。
![](https://video.ask-data.xyz/img.php?b=https://iknow-pic.cdn.bcebos.com/91529822720e0cf3916090ea0546f21fbe09aa08?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto)
3,当命令行的路径是指定的文件夹时,输入“DIR /ON /B *.* > d:\folderlist.doc”这行代码,然后按下回车来执行命令。就会在电脑的D盘生成一个名为“folderlist”的word文件。
![](https://video.ask-data.xyz/img.php?b=https://iknow-pic.cdn.bcebos.com/0eb30f2442a7d93323ed3e62a24bd11373f0015e?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto)
4,生成之后,打开电脑D盘,找到“folderlist.doc”这个文件,双击打开。
![](https://video.ask-data.xyz/img.php?b=https://iknow-pic.cdn.bcebos.com/342ac65c1038534398d542309c13b07eca80888d?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto)
5,此时,这个word文件里面就是指定文件夹的文件名清单了。
![](https://video.ask-data.xyz/img.php?b=https://iknow-pic.cdn.bcebos.com/4ec2d5628535e5dd6d9e7fce79c6a7efce1b6275?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto)