- @echo off&setlocal enabledelayedexpansion
- for /f "delims=" %%i in (mac.txt) do set /a n+=1&set _!n!=%%i
- set "v=00-00-01-01-00-04"
- for /f "delims=" %%a in ('dir /b /a-d *.txt^|find /v "mac.txt"') do (
- set/a m+=1
- for %%b in (!m!) do set t=!_%%b!
- (for /f "usebackq delims=" %%i in ("%%a") do (
- set "str=%%i"
- for %%b in (!t!) do set str=!str:%v%=_%%b!
- echo !str!
- ))>~tem
- move /y ~tem "%%a"
- )
- pause
复制代码
|