脚本主要思想是取文件中间若干行放到一个文本,剩下的放在另一个文本- @echo on
- set/a n1=13714,n2=16275
- for /f "tokens=1* delims=:" %%i in ('findstr /n .* "AURIX_TC275.hex"') do (
- if %%i lss %n1% (
- >>ED50_AURIX_TC275_App_A.hex echo.:%%j
- )
- if %%i equ %n1% (
- echo :0200000480205A>>ED50_AURIX_TC275_CalData.hex
- >>ED50_AURIX_TC275_CalData.hex echo.:%%j
- )
- if %%i gtr %n1% (
- if %%i lss %n2%(
- >>ED50_AURIX_TC275_CalData.hex echo.:%%j
- )
- )
- if %%i equ %n2% (
- >>ED50_AURIX_TC275_CalData.hex echo.:%%j
- echo :00000001FF>>ED50_AURIX_TC275_CalData.hex
- )
- if %%i grt %n2% (
- >>ED50_AURIX_TC275_App_A.hex echo.:%%j
- )
- )
复制代码
|