方法一:
for /r D:要遍历的目录 %%i (*.exe) do (
echo %%i
)
方法二:
set DestPath=D:你的目录
rem 你的后缀
set DestExt=*.exe
for /f "delims=" %%i in ('dir /b/a-d/s %DestPath%\%DestExt%') do (