回复 6# mgg9373
自己试试- @echo off
- setlocal enabledelayedexpansion
- for /f "delims=" %%i in ('dir /b /a-d *.fft^|sort /r') do (
- for /f "tokens=1,3,5,7-9 delims=-." %%a in ("%%i") do (
- set "str1=%%a"
- set "str2=0%%f"
- set "newname=%%b%%c-!str1:~0,-2!-%%d-%%e-!str2:~-2!%%~xi"
- if not exist !newname! ren "%%i" "!newname!"
- )
- )
- pause
复制代码
|