@echo off
(for /f "tokens=1-14 delims=。" %%a in (文章.txt) do (
echo.%%a
if not "%%b"=="" echo.%%b
if not "%%c"=="" echo.%%c
if not "%%d"=="" echo.%%d
if not "%%e"=="" echo.%%e
if not "%%f"=="" echo.%%f
if not "%%g"=="" echo.%%g
if not "%%h"=="" echo.%%h
if not "%%i"=="" echo.%%i
if not "%%j"=="" echo.%%j
if not "%%k"=="" echo.%%k
if not "%%l"=="" echo.%%l
if not "%%m"=="" echo.%%m
if not "%%n"=="" echo.%%n
))>new.txt
每句号换行,输出到new.txt文件中
追问谢谢你的回答。 是有换行了。。不过换行后句号不见了。 句号能不能保留? (还有你这个有限制文章内容多少吗?)
追答@echo off
(for /f "delims=" %%A in (文章.txt) do (
echo %%A|findstr "。">nul&&(
for /f "tokens=1-14 delims=。" %%a in ("%%A") do (
echo.%%a。
if not "%%b"=="" echo.%%b。
if not "%%c"=="" echo.%%c。
if not "%%d"=="" echo.%%d。
if not "%%e"=="" echo.%%e。
if not "%%f"=="" echo.%%f。
if not "%%g"=="" echo.%%g。
if not "%%h"=="" echo.%%h。
if not "%%i"=="" echo.%%i。
if not "%%j"=="" echo.%%j。
if not "%%k"=="" echo.%%k。
if not "%%l"=="" echo.%%l。
if not "%%m"=="" echo.%%m。
if not "%%n"=="" echo.%%n。
)||echo.%%A
)))>new.txt
每行最多十四句