- @echo off
- set n=2
- for /f "delims=" %%F in ('dir /b /a-d *.ini') do (
- (for /f "usebackq delims=" %%i in ("%%F") do (
- set "str=%%i"
- setlocal enabledelayedexpansion
- if "!str:\pos=(!" neq "%%i" (
- for /f "tokens=1,2 delims=,)" %%a in ("!str:*\pos(=!") do (
- set /a "i=%%a*n,j=%%b*n" 2>nul&&(
- for /f %%j in ("\pos(!i!,!j!)") do (
- set "str=!str:\pos(%%a,%%b)=%%j!"
- )
- )
- )
- )
- for /f "delims=" %%i in ("!str!") do endlocal&echo %%i
- ))>$
- move $ "%%F"
- )
- pause
复制代码
|