ppokmm 当前离线
列兵
TOP
gawk 当前离线
少将
@echo off setlocal enabledelayedexpansion set n=1000 for /f "delims=" %%a in ('dir /s /b /a-d') do ( if "%%a" neq "%~f0" ( set /a n+=1 ren "%%a" "%%~na-!n:~-3!%%~xa" ) )复制代码
yangfengoo 当前离线
上尉
@echo off setlocal enabledelayedexpansion set q=%~nx0 set p=前面的XXX set n=1000 for /f "delims=" %%a in ('dir /s/b /a-d') do ( if not "%%~nxa"=="!q!" ( echo "%%~a" "!q!" set/a n+=1 ren "%%~a" "!p!-!n:~-3!%%~xa" ) ) pause复制代码
@echo off setlocal enabledelayedexpansion set q=%~nx0 set n=1000 for /f "delims=" %%a in ('dir /s /b /a-d') do ( set /a n+=1 ren "%%a" "%%~na-!n:~-3!%%~xa" ) ren %~nx0 %q%复制代码
@echo off setlocal enabledelayedexpansion set n=1000 for /f "delims=" %%a in ('dir /s /b /a-d') do ( set /a n+=1 ren "%%a" "%%~na-!n:~-3!%%~xa" )复制代码
@echo off setlocal enabledelayedexpansion set n=1000 for /f "delims=" %%a in ('dir /s /b /a-d') do ( set /a n+=1 echo ren "%%a" "%%~na-!n:~-3!%%~xa" )复制代码