执行下面脚本
@echo on @echo > txt.txt @echo ========输出当前目录下的文件夹 >> txt.txt @for /d %%i in (*.*) do @echo %~dp0%%%i>> txt.txt @echo ========输出当前目录下的文件 >> txt.txt @for %%c in (*.*) do @echo %~dp0%%%c>> txt.txt @pause;
会在txt.txt中出现
========输出当前目录下的文件夹
F:\剧集\法证先锋III
F:\剧集\法证先锋粤语大结局抢先版
F:\剧集\美剧
========输出当前目录下的文件
F:\剧集\txt.txt
F:\剧集\xx.bat
Leave a Reply