Cyccllee 当前离线
列兵
评分人数
TOP
apang 当前离线
上将
for /f "tokens=1*" %%a in ('type "a b c.txt"') do (复制代码
@echo off for /f "tokens=1*" %%a in (a.txt) do ( if defined flag ( if /i "%%a" == ".ENDS" ( move $ "%%b.txt" & set "flag=" ) else echo,%%a %%b>>$ ) else if /i "%%a" == ".START" set flag=1 ) pause复制代码
@echo off for /f "tokens=1*" %%a in (a.txt) do ( if /i "%%a" == ".START" set flag=1 if defined flag ( echo,%%a %%b>>$ if /i "%%a" == ".ENDS" ( move $ "%%b.txt" & set "flag=" ) ) ) pause复制代码