在文本文件中添加新行与Windows批处理文件 [英] Add new line in text file with Windows batch file

查看:180
本文介绍了在文本文件中添加新行与Windows批处理文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有中有200多行的文本文件,我只想补充我使用Windows&NBSP线4条。前一个新行; XP

输入之前示例文本文件:

 头1
头2
头3
细节1
细节2

后输出:

 头1
头2
头3
< -----这是新的生产线---->
细节1
细节2


解决方案

我相信你正在使用的

 回声文本>> example.txt文件

功能?

如果这样的回答会被简单地增加一个。 (点)直接与没有别的有回音了。

例如:

 回声布拉赫
回声布拉赫2
回声。 #新线加入
呼应下布拉赫

I have a text file which has more than 200 lines in it, and I just want to add a new line before line 4. I'm using Windows XP.

Example text file before input:

header 1
header 2
header 3
details 1
details 2

After output:

header 1
header 2
header 3
<----- This is new line ---->
details 1
details 2

解决方案

I believe you are using the

echo Text >> Example.txt 

function?

If so the answer would be simply adding a "." (Dot) directly after the echo with nothing else there.

Example:

echo Blah
echo Blah 2
echo. #New line is added
echo Next Blah

这篇关于在文本文件中添加新行与Windows批处理文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆