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-13 05:55
中国DOS联盟论坛 » DOS学习入门 & 精彩文章 (教学室) » How to read strings from a text file? View 681 Replies 2
Original Poster Posted 2003-10-20 00:00 ·  中国 上海 联通
初级用户
Credits 113
Posts 3
Joined 2003-10-20 00:00
22-year member
UID 11562
Gender Male
Status Offline
Hello everyone,
I have a text file: filelist.txt, with the following contents:
2 (indicates the number of filenames)
c:\filename1
c:\filename2
I want to call the 7z compression program to compress filename1 and filename2, but I don't want to process them one by one like 7z a c:\filename1 filename. How can I get the contents of filelist.txt and then use a loop to do it?
Floor 2 Posted 2003-10-20 00:00 ·  中国 上海 联通
初级用户
Credits 113
Posts 3
Joined 2003-10-20 00:00
22-year member
UID 11562
Gender Male
Status Offline
What I mean is, make a batch file to compress all the files listed in filelist.txt.
Floor 3 Posted 2003-10-21 00:00 ·  美国
系统支持
★★★★★★
“新DOS时代”站长
Credits 27,736
Posts 10,521
Joined 2002-10-09 12:00
23-year member
UID 9
Status Offline
Use the LMOD command to do it.
Wengier - 新DOS时代

欢迎大家来到我的“新DOS时代”网站,里面有各类DOS软件和资料,地址:
http://wendos.mycool.net/

E-Mail & MSN: wengierwu AT hotmail.com (最近比较忙,有事请联系DOSroot和雨露,谢谢!)

Forum Jump: