![]() |
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-07 09:25 |
48,040 topics / 350,125 posts / today 0 new / 48,252 members |
| DOS批处理 & 脚本技术(批处理室) » [Sharing] Advanced Application Examples of the "FOR" Command |
| Printable Version 13,015 / 59 |
| Floor1 wandyac | Posted 2004-08-29 00:00 |
| 中级用户 Posts 35 Credits 205 | |
| Floor2 如是大师 | Posted 2004-08-29 00:00 |
| 元老会员 Posts 3,351 Credits 9,654 From 湖北 | |
|
Good stuff, helping bump this up
|
|
| Floor3 JonePeng | Posted 2004-09-04 00:00 |
| 金牌会员 Posts 1,883 Credits 4,562 From 广东广州 | |
|
Good! Very good! Extremely good! I've finally seen the true charm of the FOR command
|
|
| Floor4 无名sw | Posted 2004-10-29 00:00 |
| 初级用户 Posts 13 Credits 143 | |
| Floor5 jack- | Posted 2004-10-30 00:00 |
| 初级用户 Posts 12 Credits 134 | |
|
Bookmarked
|
|
| Floor6 龙王 | Posted 2004-11-02 00:00 |
| 银牌会员 Posts 334 Credits 1,186 | |
|
Too bad only the for in W2K and later batch files has this functionality. It would be great if it could be extracted somehow
|
|
| Floor7 GOTOmsdos | Posted 2004-11-02 00:00 |
| 铂金会员 Posts 1,827 Credits 5,154 | |
|
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)
|
|
| Floor8 余子枫 | Posted 2004-11-18 00:00 |
| 初级用户 Posts 5 Credits 109 | |
|
How depressing! Why can't I understand this? 55555555555555~~~~~~~~~~~~~~
|
|
| Floor9 linson | Posted 2004-11-29 00:00 |
| 中级用户 Posts 31 Credits 283 | |
|
Good stuff
|
|
| Floor10 defrag | Posted 2004-12-31 00:00 |
| 中级用户 Posts 570 Credits 456 | |
|
Systems before MS-DOS 6.22 can do this too: FOR %%A IN (/字母字窜) DO ECHO %%A can extract the first character of the string
|
|
| Floor11 扑勒蛾子 | Posted 2005-03-01 00:00 |
| 初级用户 Posts 17 Credits 147 | |
![]() Why does it always report an error!!!! |
|
| Floor12 chenhui530 | Posted 2005-03-02 00:00 |
| 高级用户 Posts 273 Credits 772 | |
|
Your runtime environment isn't on an NT-architecture system, is it?
|
|
| Floor13 不说话小子 | Posted 2005-03-29 00:00 |
| 初级用户 Posts 27 Credits 160 | |
|
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) |
|
| Floor14 JonePeng | Posted 2005-03-29 00:00 |
| 金牌会员 Posts 1,883 Credits 4,562 From 广东广州 | |
The following is quoted from 扑勒蛾子's post on 2005-3-1 23:31:03: 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. |
|
| Floor15 shijianxin | Posted 2005-08-08 01:42 |
| 初级用户 Posts 52 Credits 115 | |
|
Hard is the only word for it!
|
|
| 1 2 3 4 Next |
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |