@echo off setlocal enabledelayedexpansion for /f "delims=" %%a in ('dir /b *.jpg') do ( for /f "delims=" %%b in ('md5.exe -n "%%a"') do ( ren "%%a" "%%b.jpg" ) ) pause
md5.exe放在同一目录下