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-12 20:34
中国DOS联盟论坛 » DOS学习入门 & 精彩文章 (教学室) » Who can help me with how to use FOR..? View 1,170 Replies 2
Original Poster Posted 2008-04-09 23:14 ·  中国 北京 丰台区 联通
新手上路
Credits 23
Posts 7
Joined 2007-09-06 20:04
18-year member
UID 96731
Gender Male
Status Offline
I want to execute the DIR command in a loop 10 times. How should I write the FOR loop? Hope you can explain what it means, thanks!
Floor 2 Posted 2008-04-09 23:31 ·  中国 广西 百色 中移铁通
银牌会员
★★★
永远的菜鸟
Credits 1,335
Posts 574
Joined 2007-11-27 12:50
18-year member
UID 103929
Gender Male
From 广西
Status Offline
At the command prompt

for /l %a in (1 1 10) do @dir /b/a-d


[ Last edited by moniuming on 2008-4-9 at 10:32 PM ]
Floor 3 Posted 2008-10-07 01:42 ·  中国 广东 东莞 电信
初级用户
Credits 61
Posts 39
Joined 2007-03-22 16:49
19-year member
UID 82575
Gender Male
From come from hb--wh
Status Offline
Heh
Forum Jump: