nightbaby 当前离线
列兵
TOP
qixiaobin0715 当前离线
大校
评分人数
qixiaobin0715 发表于 2021-12-23 20:42
@echo off setlocal enabledelayedexpansion for /f "delims=" %%i in ('dir /b /a-d *.rar') do ( set str1=%%~ni set str1=!str1:)=) ! for %%j in (!str1!) do ( set str2=%%j if "!str2:~-1!"==")" set str=!str!%%j ) ren "%%i" "!str!%%~xi" set str= ) pause复制代码
for /f "tokens=1* delims=)" %%i in ('dir /b /a-d *.rar') do ren "%%i)%%j" "%%i).rar"复制代码