1:- ::高加起来大于500加(#p#分页符#e#)
- @echo off & setlocal enabledelayedexpansion
- for /f "tokens=1,2,* delims=.x" %%i in ('type xx.htm ^& del xx.htm') do (
- if not !num! lss 500 echo #p#分页符#e#>>xx.htm & set /a num=0
- echo %%ix%%j.%%k>>xx.htm
- set /a num+=%%j
-
- )
复制代码 2:- @echo off & setlocal enabledelayedexpansion
-
- for /f "tokens=1,* delims= " %%i in ('type test.htm ^& del test.htm') do (
- echo %%i %%j >>test.htm
- if "%%i"=="<img" set /a n+=1
- if !n!==2 echo #p#分页符#e# >>test.htm & set /a n=0
- )
复制代码
|