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-14 17:17
中国DOS联盟论坛 » DOS学习入门 & 精彩文章 (教学室) » How to change file attributes under DOS? View 1,232 Replies 10
Original Poster Posted 2004-04-17 00:00 ·  中国 辽宁 沈阳 中移铁通
中级用户
Credits 268
Posts 40
Joined 2004-03-06 00:00
22-year member
UID 19388
Gender Male
Status Offline
Experts, under DOS how do you remove the read-only attribute from a text file? How do you hide a file?
Floor 2 Posted 2004-04-17 00:00 ·  中国 上海 静安区 电信
初级用户
Credits 105
Posts 1
Joined 2004-04-17 00:00
22-year member
UID 22724
Gender Male
Status Offline
Use the ATTRIB command.
For example, ATTRIB +/-R +/-H followed by the file
+ and - mean add and remove R is the read-only attribute H is the hidden attribute
You can also type ATTRIB/? to see its help
Floor 3 Posted 2004-04-20 00:00 ·  中国 辽宁 沈阳 中移铁通
中级用户
Credits 268
Posts 40
Joined 2004-03-06 00:00
22-year member
UID 19388
Gender Male
Status Offline
Many thanks!
I've learned quite a bit.
----------------------------------------------------------------------
To err is human! Hehe.
Floor 4 Posted 2004-04-24 00:00 ·  中国 辽宁 沈阳 联通
中级用户
Credits 268
Posts 40
Joined 2004-03-06 00:00
22-year member
UID 19388
Gender Male
Status Offline
I want to change the read-only attribute of msdos.sys under DOS, but the screen shows Not resetting system file c:\msdos.sys
Why is that?
Floor 5 Posted 2004-04-24 00:00 ·  中国 山东 济宁 联通
钻石会员
★★★★★
Credits 10,056
Posts 3,041
Joined 2002-11-11 00:00
23-year member
UID 223
Gender Male
Status Offline
Do it like this
attrib msdos.sys -r -s -h
Then add whatever attributes you want.
简单就是美
Floor 6 Posted 2004-04-26 00:00 ·  中国 重庆 电信
银牌会员
★★★
Credits 2,165
Posts 730
Joined 2004-04-21 00:00
22-year member
UID 22966
Gender Male
Status Offline
First use attrib msdos.sys -s to remove the system attribute
Floor 7 Posted 2004-05-03 00:00 ·  中国 辽宁 沈阳 联通
中级用户
Credits 268
Posts 40
Joined 2004-03-06 00:00
22-year member
UID 19388
Gender Male
Status Offline
It doesn't work!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
help!!!!!!!!!!!!!!!!
Floor 8 Posted 2004-05-04 00:00 ·  中国 天津 南开区 联通
高级用户
★★
Credits 924
Posts 243
Joined 2003-07-09 00:00
23-year member
UID 6612
Gender Male
Status Offline
What comrade Michael said is right, I just tried it too
Floor 9 Posted 2004-05-04 00:00 ·  中国 河南 安阳 联通
银牌会员
★★★
Credits 1,186
Posts 334
Joined 2003-05-30 00:00
23-year member
UID 2626
Gender Male
Status Offline
The following is quoted from Michael's post on 2004-4-24 22:37:06:
Do it like this
attrib msdos.sys -r -s -h
Then add whatever attributes you want.

You got it backwards
It should be

attrib -r -s -h msdos.sys
Floor 10 Posted 2004-05-09 00:00 ·  中国 湖北 宜昌 电信
初级用户
Credits 113
Posts 3
Joined 2004-04-12 00:00
22-year member
UID 22347
Gender Male
Status Offline
The following is quoted from Dragon King's post on 2004-5-4 下午 03:03:54:
The following is quoted from Michael's post on 2004-4-24 22:37:06:
Do it like this
 attrib msdos.sys -r -s -h
 Then add whatever attributes you want.

You got it backwards
It should be

attrib -r -s -h msdos.sys


Isn't it the same?
Floor 11 Posted 2004-05-16 00:00 ·  中国 辽宁 沈阳 中移铁通
中级用户
Credits 268
Posts 40
Joined 2004-03-06 00:00
22-year member
UID 19388
Gender Male
Status Offline
I found a way: attrib -h -r -s msdos.sys
----------------------------------------------
Forum Jump: