- @echo off&setlocal enabledelayedexpansion
- set /a tt=0,tt3=0,x=1000
- set n=99&for %%a in (9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z) do set /a n+=1&set _!n!=%%a
-
- for %%a in (*.txt) do (
- set /a x+=1&if !x! gtr 1999 (call :zm) else (set xx=!x:~-3!)
- for /f "tokens=1* delims=:" %%b in ('type "%%~a"^|findstr /n .*^&del "%%~a"') do (if %%b==3 (echo.Serial Number : 0287914EA1000!xx!) else (echo.%%c))>>"%%a"
- )
- pause
- :zm
- set /a b=100+(!tt!-26)/676,s=100+!tt3!,g=101+!tt!%%26
- set /a tt+=1,tt1=1+!tt!%%26
- if !tt1!==26 set /a tt2+=1,tt3=1+!tt2!%%26
- for /f "tokens=1-3" %%a in ("_!b! _!s! _!g!") do set xx=!%%a!!%%b!!%%c!
复制代码
|