CODE: [Copy to clipboard]@echo off set /p ext=请输入想要的文件扩展名: for %%a in (c d e f) do dir /a/s/b "%%a:\*.%ext%" >>a.txt