发布网友 发布时间:2024-10-24 14:58
共1个回答
热心网友 时间:2小时前
@echo off
::修改当前目录下所有文件,倒数第3-5字符放首部加空格
for /f "delims=" %%a in ('dir /b/a-d') do (
set str=%%~na
setlocal enabledelayedexpansion
set "pre=!str:~-5,3!"
set "end=!str:~-2!"
set "mid=!str:~0,-5!"
ren "%%a" "!pre! !mid!!end!%%~xa"
endlocal
)
pause