bat遍历文件夹,输出当前文件夹下所有文件 到fileName.txt文件。
运行前先找小文件夹测试一下。
Dir *.* /B > fileName.txt for /r %cd% %%i in (*.*) do ( echo %%i >> fileName.txt )
结果例子:
fileName.txt
Hadoop01
Hadoop02
hadoop03
Hadoop04
Hadoop05
Hadoop06
Hadoop07
Hadoop08
Hadoop09
Hadoop10
hadoop11
hadoop12
run folder.bat
D:DownloadhadoopfileName.txt
D:Downloadhadoop
un folder.bat
D:DownloadhadoopHadoop01Hadoop01.pdf
D:DownloadhadoopHadoop01hadoop01a_Hadoop的源起与体系介绍.mp4
D:DownloadhadoopHadoop01hadoop01b_Hadoop的源起与体系介绍.mp4
。。。略