欢迎来到天天文库
浏览记录
ID:30838404
大小:52.05 KB
页数:10页
时间:2019-01-04
《批处理命令系统属性》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、批处理命令系统属性HowtosetupfilesforprotectedoperatingsystemfilesUseabatchcommand:Attrib+sSuchas:Ihaveafilecalledn.txtinmyDtraydirectory,sothemethodtosetitasasystemfileis:Attribd:.txt+sIhopeyouunderstand.Goodlucktoyou!Remove:forexampleaboveAttribd:.txt~sThesystempro
2、pertiesofthen.txtfilecanbecanceledYoucangotothecommandpromptandusethecomma,ndattrib+S+H+Afilename/S/dNote:filenameisthenameofyourfolder,andinadvanceyouhavetogototherootdirectorywherethefolderislocated,andyoucanalsotypeinthepathsuchasattrib+S+h+rC:/flienameThe+sissettothesys
3、tempropertiesThe+hissettohide+asettingarchive+rsettingread-onlyThehintisthatthesystempropertiesarenotdeleted,youmaynotseethechangesIfyouwanttoseeyourfoldersandyoucangivetheeffectofthesystempropertyanditisahiddenattribute,thenthetool-folderoptions-showallfilesandfolders,butd
4、idyoufoundthefolderornot・Thenremovethehookhiddenfolder,protectedbythesystemsothatitoutagain.ThisshowsthatitisthesystemfolderAttribusageInstructionsareusedtomodifythepropertiesofthefile・Thecommonpropertiesofthefileare:read-only.Archive・Hideandsystem・Aread-onlypropertyisanope
5、rationthatcanonlybereadbyafile・Theoperationthatcannotbewrittentothefileisthewriteprotectionofthefile・Archiveattributeisusedtotagfileschanges・Afterthelastbackupfilechange・Somebackupsoftwarewillonlywhenbackuptothebackupfilewitharchiveattribute・Iliddenattributes,asthenameimpli
6、es,arehiddenfiles・Intheusualcase,fileswithhiddenpropertiesarenotdisplayedintheresourcemanager・Thesystemattributeistheindexinjectiondocument・Itisthefilethatthesystemneedstocal1.TheformatoftheattribinstructionandthecommonparameterisATTRIB[+R
7、-r][+A
8、-A],[+S
9、-s][+H
10、-H][[drive:]
11、[path]f订ename][/S[/D]]+setproperties・-clearproperties・Rread-onlyfileproperties.Aarchivefileproperties・Ssystemfileproperties・Hhidesthefileproperties.[path][filename]Specifythefilepropertiestobeprocessed・/Shandlesthematchingfilesinthecurrentfolderanditssubfolders・/Dalsohandle
12、sfolders.Attribpurposesnotwidespread.Butsometimesitcanbeusedtodosomeconvenientfile
此文档下载收益归作者所有