bat遍历指定文件夹的文件名 @echo off for /f "delims=\" %%a in ('dir /b /a-d /o-d "%cd%\img\*jpg*"') do ( echo %%a ) %cd%是当前目录