umenoko 当前离线
列兵
@echo off call :loop "%cd%" for %%a in (*.jpg) do ( set /a n+=1 set "str=%%a" setlocal enabledelayedexpansion ren "!str!" "%var%-!n!%%~xa" endlocal ) pause&exit :loop set "var=%~nx1"复制代码
qixiaobin0715 当前离线
大校
@echo off set n=100 setlocal enabledelayedexpansion for %%i in (*.jpg) do ( set /a n+=1 for /d %%a in ("%%~dpi.") do ren "%%i" "%%~na-!n:~1!%%~xi" ) pause复制代码
TOP
smss 当前离线
中尉
@Echo off&SetLocal EnableDelayedExpansion&set n=100 for /d %%i in (*)do for /r %%j in (*.bmp,*.jpg,*.gif,*.png)do set /a n+=1&ren "%%j" "%%~ni-!n:~1!%%~xj" pause复制代码
cutebe 当前离线
上尉
@echo off md newfolder set n=100 setlocal enabledelayedexpansion for %%i in (*.jpg) do ( set /a n+=1 for /d %%a in ("%%~dpi.") do move "%%i" "newfolder\%%~na-!n:~1!%%~xi" ) pause复制代码