本帖最后由 qixiaobin0715 于 2021-3-4 09:16 编辑
- @echo off
- set n=0
- set "line1=^<a href="https://bobopic.com/tag/"
- set "line2=^<a href="https://baidu.com/tag/"
- setlocal enabledelayedexpansion
- for /f "tokens=1-3 delims=#" %%a in (0.txt) do (
- if not "%%b"=="" (
- set /a n+=1
- set /a m=!n!%%2
- if !m!==1 (
- echo,%%a%line1%%%b"^>%%b^</a^>%%c
- ) else (
- echo,%%a%line2%%%b"^>%%b^</a^>%%c
- )
- ) else (
- echo,%%a
- )
- )
- pause
复制代码
|