attrib [+r|-r] [+a|-a] [+s|-s] [+h|-h] [d: ] [name] [/s]
缺省 attrib name 顯示文件的(文件)屬性
attrib io.sys (或子目錄)
shr c:\ io.sys 指定為系統(tǒng)(s) 隱含(h) 只讀(r)文件
也可以attrib *.sys 顯示擴(kuò)展名為sys的文件屬性
參數(shù) [+r|-r] 將文件屬性設(shè)置或解除 只讀屬性
[+a|-a] 將文件屬性設(shè)置或解除 歸檔屬性
[+h|-h] 將文件屬性設(shè)置或解除 隱含屬性 (尤其對子目錄也起作用)
/s 參數(shù) 將當(dāng)前及當(dāng)前子目錄下的所有文件均起作用
可以用來查找文件
例子:
attrib news86 列news86的文檔屬性
attrib +r report.txt 設(shè)置為只讀 attrib -s -h record.txt
attrib +a a:*.*
attrib -a a:*.bak
xcopy a: b: /a 將A盤上的所有標(biāo)志為"歸檔"屬性的文件拷到B盤
xcopy a: b: /m 將A盤上的所有文件拷到B盤后并移去歸檔屬性
![]() | ![]() .. 定價:¥133 優(yōu)惠價:¥133.0 更多書籍 |
![]() | ![]() .. 定價:¥124 優(yōu)惠價:¥124.0 更多書籍 |