[新手上路]批处理新手入门导读[视频教程]批处理基础视频教程[视频教程]VBS基础视频教程[批处理精品]批处理版照片整理器
[批处理精品]纯批处理备份&还原驱动[批处理精品]CMD命令50条不能说的秘密[在线下载]第三方命令行工具[在线帮助]VBScript / JScript 在线参考
返回列表 发帖
下载 sed.exe
http://bcn.bathome.net/s/tool/index.html?key=sed

把它和test.bat放到txt所在的文件夹下
测试test.bat之前做好txt文件备份
  1. @echo off
  2. set InsertLine=3
  3. set InsertTag=h1
  4. set InsertStr=搞笑歇后语句子大全
  5. for /f "delims=" %%i in ('dir /b /a-d *.txt') do (
  6.     echo 正在处理文件 %%i
  7.     sed -i "%InsertLine%s#$#\n<%InsertTag%>%InsertStr%</%InsertTag%>#" "%%i"
  8. )
复制代码
我帮忙写的代码不需要付钱。如果一定要给,请在微信群或QQ群发给大家吧。
【微信公众号、微信群、QQ群】http://bbs.bathome.net/thread-3473-1-1.html
【支持批处理之家,加入VIP会员!】http://bbs.bathome.net/thread-67716-1-1.html

TOP

返回列表