中国DOS联盟论坛

China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
Guest | Log in | Register | Members | Search | China DOS Union
中国DOS联盟论坛
The time now is 2026-08-12 05:24
47,811 topics / 349,897 posts / today 0 new / 48,256 members
DOS批处理 & 脚本技术(批处理室) » How to split a text file so each line becomes a new text file
Printable Version  929 / 5
Floor1 keeds Posted 2010-06-14 17:31
新手上路 Posts 8 Credits 11
Split text.txt like this
http://www.qidian.com/book/1510857.aspx
http://www.qidian.com/book/1518407.aspx
http://www.zhulang.com/130808/index.html
http://www.17k.com/book/65798.html
http://book.zongheng.com/book/39679.html
and make it become text like this
1.txt
http://www.qidian.com/book/1510857.aspx
2.txt
http://www.qidian.com/book/1518407.aspx
……
------------------------------------------------------------------
Or split it into text like this
1.txt

URL=http://www.qidian.com/book/1510857.aspx
2.txt

URL=http://www.qidian.com/book/1518407.aspx
……

What I want is to convert the list of links in the text into individual *.URl files, so it's convenient to import into the browser

Asking the experts here, I can use for to extract each line, but I don't know how to output it to text
Floor2 Hanyeguxing Posted 2010-06-14 20:15
银牌会员 Posts 897 Credits 1,039 From 在地狱中仰望天堂
1, there must be no blank lines in the text: 2, there must be no blank lines in the text:

[ Last edited by Hanyeguxing on 2010-6-15 at 09:18 ]
Floor3 keeds Posted 2010-06-14 23:15
新手上路 Posts 8 Credits 11
Originally posted by Hanyeguxing at 2010-6-14 20:15:
1, There must not be blank lines in the text:
Floor4 pdanniel66 Posted 2010-06-15 05:16
初级用户 Posts 64 Credits 68
Change your text.txt to test.txt, or change the Batch's test.txt to text.txt
Floor5 keeds Posted 2010-06-15 11:53
新手上路 Posts 8 Credits 11
Originally posted by pdanniel66 at 2010-6-15 05:16:
Change your text.txt to test.txt, or change the Batch's test.txt to text.txt


Haha, I didn't see it clearly and made a fool of myself
Floor6 keeds Posted 2010-06-15 11:55
新手上路 Posts 8 Credits 11
It worked, many thanks to Hanyeguxing for solving the problem, and to pdanniel66 for the correction. I learned a bit more too, I'll go study what the commands do
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023