China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-08-04 11:11
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » Split a TXT file with a batch file View 834 Replies 2
Original Poster Posted 2007-04-26 11:08 ·  中国 浙江 杭州 电信
新手上路
Credits 4
Posts 1
Joined 2007-04-24 08:11
19-year member
UID 86271
Gender Male
Status Offline

─────────────────── Moderation Record ────────────────────
Handled by: lxmxn
Original title: Can a batch file handle something like this
Note: Because the title is too vague, it is not convenient for forum searching and management. Please modify the title within three days.
Tip: To modify the title, click Edit at the lower right corner of the current post, and after making the changes, press Edit Post.
Penalty: Since you are new to the forum, no penalty will be given for the time being; if the title is still not modified after three days, 2 credits will be deducted,
   as a punishment, and the moderator will forcibly change the title. Please click here to read the forum posting rules or see
   How To Ask Questions The Smart Way, so as to avoid violating the rules in future discussions.
─────────────────── Moderation Record ────────────────────

If there is a txt file, size 4mb, and now I want to write a batch file to split this txt file into several smaller txt files according to certain conditions.
For example, the requirement is that each new txt file be named XXX1.txt .... XXX2.txt... XXX3.txt like this, with each one being 20KB.

Can this be done with a batch file? I sincerely ask for an answer, I can't write it!

[ Last edited by jifenglang on 2007-5-2 at 07:42 AM ]
Floor 2 Posted 2007-04-26 12:05 ·  中国 广东 广州 鹏博士宽带
初级用户
★★
Credits 176
Posts 78
Joined 2007-04-15 10:53
19-year member
UID 85268
Gender Male
Status Offline
Yes. If you combine a batch file with VBS, it can be done very easily.
Floor 3 Posted 2007-04-26 12:23 ·  中国 甘肃 张掖 电信
金牌会员
★★★★
Credits 4,103
Posts 1,744
Joined 2006-01-20 13:00
20-year member
UID 49241
Gender Male
From 甘肃.临泽
Status Offline
Forum Jump: