//将文件名前添加DKSYT字符
for /f "delims=" %%i in ('dir /b *.*') do (
set "var=%%i" & ren "%%i" "!var:%str1%=%str2%!")
@echo off
setlocal enabledelayedexpansion
set n= 23
//保留文件名前23个字符
for /f "delims=" %%a in ('dir /a-d /b *.*') do (
set "name=%%~na"
ren "%%~a" "!name:~0,%n%!%%~xa"
)