@echo off for /d %%a in (*) do ( echo 正在处理文件夹:%%a pushd "%%a" for /f "delims=" %%b in ('dir /b /a-d *.jpg *.png') do ( ren "%%b" "%%~a-%%b" ) popd )复制代码