@echo offfor /f "delims=" %%a in ('dir /a-d/b/s e:\test\*.jpg') do ( for /f "delims=_ tokens=1*" %%b in ("%%~nxa") do ( echo ren "%%~a" "%%~dpa_%%c" ))pause运行下,可以的话去掉 echo 即可。