本帖最后由 hfxiang 于 2022-9-25 08:48 编辑
无测试大环境,故未经测试- @echo off
- set key = 降低 减少 减弱
- setlocal enabledelayedexpansion
- cd /d "%~dp0"
- for /f "delims=" %%i in ('dir /b /s /a-d ^| findstr /i "%key%" ^| findstr /v /x "%~nx0"') do (
- set "NewName=%%~ni"
- for %%a in (%key%) do (
- set NewName=!NewName:%%a=↘!
- set NewName=%%~dpi!NewName!%%~xi
- )
- move /y "%%~fi" "!NewName!"
- )
复制代码
|