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-07-31 22:33
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » [Help]Modify attributes of all hidden files with for command View 6,155 Replies 32
Floor 16 Posted 2007-01-23 01:38 ·  中国 广东 广州 电信
初级用户
Credits 99
Posts 43
Joined 2007-01-12 23:05
19-year member
UID 76317
Gender Male
Status Offline
The help says that if there is no drive letter specified after for /r, then the system will default to the current drive letter.

So, for the LZ's
for /r %%a in (c: d: e: f:) do tree /f > 1.txt and
for /r %%a in (c: d: e: f:) do attrib -h *.info
Both will only execute under the current drive letter and will not execute the desired operations on the 4 drives.
Floor 17 Posted 2007-01-23 07:20 ·  中国 湖北 武汉 电信
版主
★★★★★
Credits 11,386
Posts 4,938
Joined 2006-07-23 17:10
20-year member
UID 59080
Status Offline
Originally posted by bob1989 at 2007-1-21 21:02:
C:\>wmic
'wmic' 不是内部或外部命令,也不是可运行的程序
或批处理文件。


  What system are you using?
Floor 18 Posted 2007-01-23 07:25 ·  中国 湖北 武汉 电信
版主
★★★★★
Credits 11,386
Posts 4,938
Joined 2006-07-23 17:10
20-year member
UID 59080
Status Offline
Originally posted by hangyug at 2007-1-22 12:38:
This is what it says in the help. If you don't specify a drive letter after /r, the system will default to the current drive.
So, LZ's
for /r %%a in (c: d: e: f:) do tree /f > 1.txt and
for /r %%a in ( ...


  It's not the default current drive, but the default current directory.
Floor 19 Posted 2007-01-24 12:39 ·  中国 广东 广州 电信
初级用户
Credits 24
Posts 14
Joined 2006-10-08 01:22
19-year member
UID 64863
Status Offline
I'm speechless, just the word "awesome", it seems there are extremely many awesome people here.
Floor 20 Posted 2007-01-24 14:23 ·  中国 河南 郑州 联通
新手上路
Credits 9
Posts 5
Joined 2006-11-21 00:09
19-year member
UID 71170
Gender Male
Status Offline
Learning
Floor 21 Posted 2007-08-03 16:22 ·  中国 广东 珠海 电信
初级用户
Credits 57
Posts 29
Joined 2006-09-27 02:04
19-year member
UID 63754
Status Offline
Learned...
Floor 22 Posted 2007-08-04 19:38 ·  中国 天津 联通
新手上路
Credits 8
Posts 4
Joined 2007-08-04 18:03
18-year member
UID 94644
Gender Male
Status Offline
Laugh... If the 15th floor is using an XP system, it must be a stripped-down version, and it just happened to have wmic removed.
Floor 23 Posted 2007-08-15 16:45 ·  中国 广东 佛山 顺德区 电信
初级用户
★★
Credits 193
Posts 98
Joined 2007-01-17 11:56
19-year member
UID 76803
Gender Male
Status Offline
...Got it... WMIC is powerful.
这家伙很聪明 什么都没留下
Floor 24 Posted 2007-08-27 20:03 ·  中国 广东 深圳 诺瓦科技发展有限公司
初级用户
Credits 32
Posts 21
Joined 2007-08-22 13:29
18-year member
UID 95593
Gender Male
Status Offline
Floor 25 Posted 2007-08-28 00:55 ·  中国 浙江 杭州 电信
初级用户
Credits 52
Posts 21
Joined 2007-02-14 13:12
19-year member
UID 79500
Gender Male
From 浙江杭州
Status Offline
Today I'm learning the for command and wanted to find some examples to look at. Unexpectedly, I found one here. lxmln is really amazing~! I don't know if this counts as water filling or something else.
Floor 26 Posted 2007-10-21 01:24 ·  中国 山东 青岛 联通
初级用户
★★
Credits 146
Posts 86
Joined 2007-10-01 11:27
18-year member
UID 98691
Gender Male
Status Offline
Floor 27 Posted 2007-10-21 04:44 ·  中国 湖北 武汉 电信
初级用户
Credits 40
Posts 16
Joined 2007-10-21 04:17
18-year member
UID 100311
Gender Male
Status Offline
Floor 28 Posted 2007-10-22 19:15 ·  中国 江西 南昌 电信
中级用户
★★
Credits 245
Posts 123
Joined 2007-06-08 09:04
19-year member
UID 90636
Gender Female
Status Offline
Floor 29 Posted 2007-10-25 18:20 ·  中国 湖南 长沙 电信
初级用户
★★
Credits 187
Posts 87
Joined 2007-10-23 16:04
18-year member
UID 100558
Gender Male
Status Offline
Brother lxmxn is really amazing!
Re: [Post 15]:
The "wmic" command is not available in the Windows 2000 system!
Floor 30 Posted 2007-10-25 20:43 ·  中国 四川 绵阳 电信
初级用户
Credits 30
Posts 15
Joined 2007-06-07 14:22
19-year member
UID 90558
Gender Male
Status Offline
Hehe...
Really awesome...
Forum Jump: