#功能是 将文件名包含"str1"的字符更改为"str2"
@echo off
set /p str1= input filename str1 : //输入
set /p str2= str2:
echo.
echo please wait…… //处理中请等待……
for /f "delims=" %%a in ('dir /s /b ^|sort /+65535') do (
if "%%~nxa" neq "%~nx0" (
set "file=%%a"
set "name=%%~na"
set "extension=%%~xa"
call set "name=%%name:%str1%=%str2%%%"
setlocal enabledelayedexpansion
ren "!file!" "!name!!extension!" 2>nul
endlocal
)
)
exit
11-23
2768
01-21
654