- @echo off&setlocal enabledelayedexpansion
- for %%a in (*.txt) do (
- (for /f "usebackq delims=" %%b in ("%%a") do (
- set "str=%%b"
- for %%b in (aaa-AAA bbb-BBB ccc-CCC) do (
- for /f "tokens=1,2 delims=-" %%c in ("%%b") do set "str=!str:%%c=%%d!"
- )
- echo !str!
- ))>$
- move $ "%%a"&ren "%%a" "%%~na.bat"
- )
-
-
复制代码
|