Is any way to insert blank lines in the text file?
Posted: 12 Mar 2018 15:00
Hi,
I have a txt file and need to replace some txt for updating.
I can do the job but the thing is that after the converting, the format of this txt file is shrinking in terms of missing blank lines and looks a little bit ugly ...
Is any way to insert new blink line in each paragraph or another work around to do the job?
Thanks
I have a txt file and need to replace some txt for updating.
Code: Select all
.......
set oldgen=%oldgen: =%
set newgen=%newgen: =%
@echo off &setlocal
set "search=%oldgen%"
set "replace=%newgen%"
set "textfile=Readme-how-to-use-this-package.txt"
set "newfile=indesnew.txt"
(for /f "delims=" %%i in (%textfile%) do (
set "line=%%i"
setlocal enabledelayedexpansion
set "line=!line:%search%=%replace%!"
echo(!line!
endlocal
))>"%newfile%"
del %textfile%
rename %newfile% %textfile%
Is any way to insert new blink line in each paragraph or another work around to do the job?
Thanks