例如1.txt上有如下文字:
花厅
我来看过
你,
可是你
不在家里,回来联系我!!
小明。
人物
要求结果为如下输出至2.txt
花厅
我来看过你,可是你不在家里,回来联系我!!小明。
人物
请高手赐教,不好意思,没有财富值了!谢谢!!
师傅,无输出呢!帮我看看有错吗?
追答@echo off
setlocal enabledelayedexpansion
(for /f "tokens=1,2 delims=:" %%i in ('findstr /n .* 1.txt') do (
set s=!s!%%j
if "%%j"=="" echo !s!&echo.&set s=
))>2.txt
echo !s!>>2.txt
notepad 2.txt
rem move /y 2.txt 1.txt