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-07 08:35
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » [Sharing] Advanced Application Examples of the "FOR" Command View 13,009 Replies 59
Original Poster Posted 2004-08-29 00:00 ·  中国 广东 广州 天河区 电信
中级用户
Credits 205
Posts 35
Joined 2002-10-28 00:00
23-year member
UID 83
Gender Male
Status Offline
Floor 2 Posted 2004-08-29 00:00 ·  中国 河南 信阳 联通
元老会员
★★★★★
步行的人
Credits 9,654
Posts 3,351
Joined 2003-03-11 00:00
23-year member
UID 1113
Gender Male
From 湖北
Status Offline
Good stuff, helping bump this up
弄花香满衣,掬水月在手。
明月鹭鸟飞, 芦花白马走。
我自一过后,野渡现横舟。
青云碧空在,净瓶水不流。
http://dos.e-stone.cn/guestbook/index.asp
======中國DOS聯盟=====
我的新网页http://rsds.7i24.com欢迎光顾
Floor 3 Posted 2004-09-04 00:00 ·  中国 广东 广州 白云区 电信
金牌会员
★★★★
D◎$ Fαп
Credits 4,562
Posts 1,883
Joined 2004-01-19 00:00
22-year member
UID 15812
Gender Male
From 广东广州
Status Offline
Good! Very good! Extremely good! I've finally seen the true charm of the FOR command
----====≡≡≡≡ 我的至爱,永远是MSDOS!≡≡≡≡====----
Floor 4 Posted 2004-10-29 00:00 ·  中国 浙江 丽水 联通
初级用户
Credits 143
Posts 13
Joined 2004-08-06 00:00
22-year member
UID 29771
Gender Male
Status Offline
Floor 5 Posted 2004-10-30 00:00 ·  中国 广东 东莞 电信
初级用户
Credits 134
Posts 12
Joined 2004-10-30 00:00
21-year member
UID 33090
Gender Male
Status Offline
Bookmarked
Floor 6 Posted 2004-11-02 00:00 ·  中国 河南 安阳 联通
银牌会员
★★★
Credits 1,186
Posts 334
Joined 2003-05-30 00:00
23-year member
UID 2626
Gender Male
Status Offline
Too bad only the for in W2K and later batch files has this functionality. It would be great if it could be extracted somehow
Floor 7 Posted 2004-11-02 00:00 ·  中国 广东 广州 教育网
铂金会员
★★★★
C++启程者
Credits 5,154
Posts 1,827
Joined 2003-07-18 00:00
23-year member
UID 7105
Gender Male
Status Offline
Thanks, I noticed the new switches added to FOR in 2000/XP a long time ago, like the very useful /F and /R. I also wrote related posts, but nobody paid attention, and there were a few questions I hadn't solved. Now they've been solved, so I'm quite happy. There are a few questions I'd like the OP to explain if possible: 1, ...("STRING") ... could you give a useful example? 2, %I expansion: can you use examples to explain the difference between %~sI and %~fsI? (I tried them, and the result was the same)
Floor 8 Posted 2004-11-18 00:00 ·  中国 河南 郑州 联通
初级用户
Credits 109
Posts 5
Joined 2004-11-18 00:00
21-year member
UID 33764
Gender Male
Status Offline
How depressing! Why can't I understand this? 55555555555555~~~~~~~~~~~~~~
Floor 9 Posted 2004-11-29 00:00 ·  中国 福建 厦门 电信
中级用户
Credits 283
Posts 31
Joined 2004-03-06 00:00
22-year member
UID 19334
Gender Male
Status Offline
Good stuff
Floor 10 Posted 2004-12-31 00:00 ·  中国 山东 济宁 电信
中级用户
★★★
痴迷DOS者
Credits 456
Posts 570
Joined 2004-10-09 00:00
21-year member
UID 32281
Gender Male
Status Offline
Systems before MS-DOS 6.22 can do this too: FOR %%A IN (/字母字窜) DO ECHO %%A can extract the first character of the string
DOS不是万能的,没有DOS是万万不能的
自古系统谁无死?留取胆清照汗青!uploadImages/20035317345478982.png
Floor 11 Posted 2005-03-01 00:00 ·  中国 江苏 徐州 联通
初级用户
我没有钱 我不要脸
Credits 147
Posts 17
Joined 2005-01-16 00:00
21-year member
UID 35395
Gender Male
Status Offline


Why does it always report an error!!!!
我没有钱 我不要脸
我只要她的爱情给我一点点
Floor 12 Posted 2005-03-02 00:00 ·  中国 湖南 长沙 电信
高级用户
★★
Credits 772
Posts 273
Joined 2004-10-23 00:00
21-year member
UID 32861
Gender Male
Status Offline
Your runtime environment isn't on an NT-architecture system, is it?
http://www.msfans.net/bbs/
Floor 13 Posted 2005-03-29 00:00 ·  中国 广东 佛山 高明区 电信
初级用户
Credits 160
Posts 27
Joined 2005-03-24 00:00
21-year member
UID 37408
Gender Male
Status Offline
It wasn't written by you, was it? You used /? and then copied it out and posted it as your own article. You really don't get it. Look at mine—I wrote it using my own brain, concise and easy to learn.
DOSBIOS section www.orthopedicscn.com/cgi-bin/bbs/bbs.cgi?id=weikiss()http://my.coolala.net/bbs.php?a=dosbios (new, no data yet)
Floor 14 Posted 2005-03-29 00:00 ·  中国 广东 广州 海珠区 电信
金牌会员
★★★★
D◎$ Fαп
Credits 4,562
Posts 1,883
Joined 2004-01-19 00:00
22-year member
UID 15812
Gender Male
From 广东广州
Status Offline
The following is quoted from 扑勒蛾子's post on 2005-3-1 23:31:03:

Why does it always report an error!!!!

Those parameters of the for command are only valid under the command prompt of an NT system. In pure DOS and the MSDOS mode of Win9x, the for command is very limited.
----====≡≡≡≡ 我的至爱,永远是MSDOS!≡≡≡≡====----
Floor 15 Posted 2005-08-08 01:42 ·  中国 广东 广州 越秀区 电信
初级用户
★★
Credits 115
Posts 52
Joined 2005-08-07 22:10
20-year member
UID 41435
Gender Male
Status Offline
Hard is the only word for it!
愿你们永远开心
Forum Jump: