tttoi2000 当前离线
上等兵
qixiaobin0715 当前在线
大校
@echo off setlocal enabledelayedexpansion for /f "tokens=1* delims=." %%i in ('dir /s /b /a-d *.jpg') do ( set /a n+=1 set m=000!n! ren "%%i.%%j.jpg" "%%~ni.!m:~-3!.jpg" )复制代码
TOP
pd1 当前离线
五级士官
<# : @echo off powershell -NoProfile -ExecutionPolicy bypass "Get-Content -literal '%~f0' |Out-String|Invoke-Expression" pause #> $n=1 ls -Recurse *.jpg|%{$newname="{0}.{1:d3}.jpg" -f $_.BaseName.split(".")[0],$n;$n+=1;ren $_ $newname}复制代码