@echo off
for /f "tokens=1,2,3 delims=_." %%i in ('dir /a-d/b') do (
if not "%%k"=="" (
if exist "%%i.%%k" call :gm "%%i_%%j.%%k" "%%i.%%k"
if exist "%%i_%%j.%%k" ren "%%i_%%j.%%k" "%%i.%%k"
))
echo 更名完成!&pause>nul &exit
:gm
set n=0
:lp
set/a n+=1
if exist "%~n2(%n%)%~x2" goto lp
ren "%~1" "%~n2(%n%)%~x2"
goto :eof
System.out.println("Perimeter:"+perim);