bat遍历目录时间:2023-03-09 08:49:02 方法一: 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 ( echo %%i )