@echo off cd /d "%~dp0" setlocal enabledelayedexpansion set "n=1" for /f "delims=" %%i in ('dir /b /od *.jpg') do ( ren "%%i" "!n!%%~xi!" set /a "n+=1" )复制代码