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-06-26 11:24
中国DOS联盟论坛 » DOS疑难解答 & 问题讨论 (解答室) » [Discussion]The DOS command attrib /s /d cannot work on subfolders of the specified folder View 1,830 Replies 4
Original Poster Posted 2010-03-11 12:36 ·  中国 广东 东莞 电信
初级用户
Credits 23
Posts 13
Joined 2009-06-02 07:33
17-year member
UID 146527
Gender Male
Status Offline
In the root directory bat
@echo off
mkdir \a\b\c
attrib +s +h +r a /s /d
Why does the folder a have an effect, but the subfolders of a are not affected?

[ Last edited by lzbow on 2010-3-11 at 12:37 ]
我不是人
Floor 2 Posted 2010-03-13 20:05 ·  中国 广西 桂林 电信
新手上路
Credits 13
Posts 7
Joined 2010-03-06 18:48
16-year member
UID 161705
Gender Male
Status Offline
Are you running this command under Windows or under pure DOS?
Floor 3 Posted 2010-07-08 17:20 ·  中国 福建 厦门 电信
初级用户
Credits 24
Posts 13
Joined 2008-12-15 22:06
17-year member
UID 133989
Gender Male
Status Offline
It is likely that the priority of the /s option is higher than that of /d.
Floor 4 Posted 2010-07-22 14:20 ·  中国 广东 广州 移动
初级用户
★★
Credits 131
Posts 72
Joined 2008-02-24 14:31
18-year member
UID 111317
Gender Male
Status Offline
/S processes matching files in the current folder and all its subfolders.
/D also processes folders. It seems the original poster still doesn't understand the functions of these two parameters...


mkdir \a\a\a
attrib +s +h +r a /s /d

Go and check the result...
Floor 5 Posted 2010-07-22 14:23 ·  中国 广东 广州 移动
初级用户
★★
Credits 131
Posts 72
Joined 2008-02-24 14:31
18-year member
UID 111317
Gender Male
Status Offline
mkdir \a\a
cd.>\a\a\a
attrib +s +h +r a /s /d

Let's look at the effect of this... Probably, you'll understand the meaning of /s /d...
Forum Jump: