bryant2009 当前离线
列兵
@echo for /f "tokens=1* delims=这里是修改前后的符号" %%a in (list.txt) do ren "%%a" "%%b" pause复制代码
ShowCode 当前离线
VIP1
@echo off for /f "tokens=1*" %%a in (list.txt) do ( for /f "delims=" %%i in ('dir /b /s /ad ^| sort /r') do ( if /i "%%~nxi" == "%%a" ( echo "%%i" --- "%%b" ren "%%i" "%%b" ) ) ) pause复制代码
TOP
77七 当前离线
中校
@echo off cd /d "%~dp0" for /f "useback tokens=1* delims=符号" %%a in ("list.txt") do ( set _"%%a"=%%b ) for /r %%i in (*) do ( if defined _"%%~ni" ( call ren "%%i" "%%_"%%~ni"%%%%~xi" ) ) pause复制代码