Visual Basic Scripting Edition | ÕZ(y¨³)ÑÔ…¢¿¼ |
ÔO(sh¨¨)Öûò·µ»ØÎļþ»òÎļþŠAµÄŒÙÐÔ¡£¿É×xŒ‘(xi¨§)»òÖ»×x£¨ÅcŒÙÐÔÓÐêP(gu¨¡n)£©¡£
object.Attributes [= newattributes]
object
±Øßxí—(xi¨¤ng)¡£‘ª(y¨©ng)žé File »ò Folder Œ¦(du¨¬)ÏóµÄÃû·Q¡£
newattributes
¿Éßxí—(xi¨¤ng)¡£Èç¹ûÖ¸¶¨´Ë…¢”µ(sh¨´)£¬„t newattributes žéÖ¸¶¨µÄ object µÄŒÙÐÔµÄÐÂÖµ¡£
newattributes …¢”µ(sh¨´)¿ÉžéÏÂÁÐÔO(sh¨¨)ÖÃÖ®Ò»»òÏÂÁÐÔO(sh¨¨)ÖõĺÏÀí½MºÏ£º
³£”µ(sh¨´) | Öµ | ÃèÊö |
---|---|---|
Normal | 0 | ÆÕͨÎļþ¡£›](m¨¦i)ÓÐÔO(sh¨¨)ÖÃÈκΌÙÐÔ¡£ |
ReadOnly | 1 | Ö»×xÎļþ¡£¿É×xŒ‘(xi¨§)¡£ |
Hidden | 2 | ë[²ØÎļþ¡£¿É×xŒ‘(xi¨§)¡£ |
System | 4 | ϵ½y(t¨¯ng)Îļþ¡£¿É×xŒ‘(xi¨§)¡£ |
Directory | 16 | ÎļþŠA»òĿ䛡£Ö»×x¡£ |
Archive | 32 | Éϴ΂ä·ÝºóÒѸü¸ÄµÄÎļþ¡£¿É×xŒ‘(xi¨§)¡£ |
Alias | 1024 | 朽ӻò¿ì½Ý·½Ê½¡£Ö»×x¡£ |
Compressed | 2048 | ‰º¿sÎļþ¡£Ö»×x¡£ |
ºöÂÔŒ¦(du¨¬)Ö»×xŒÙÐÔ£¨„eÃû£¬‰º¿s»òĿ䛣©Ëù×÷µÄ¸Ä׃.
®”(d¨¡ng)ÔO(sh¨¨)ÖÃŒÙÐÔ•r(sh¨ª)£¬‘ª(y¨©ng)Ê×ÏÈé†×x®”(d¨¡ng)ǰŒÙÐÔ£¬È»ºó°´ÒªÇó¸Ä׃‚€(g¨¨)„eŒÙÐÔ£¬×îºó·´Œ‘(xi¨§)ŒÙÐÔ.
ÒÔÏ´ú´aÅeÀýÕf(shu¨)Ã÷ÈçºÎʹÓà Attributes ŒÙÐÔ£º
Function ToggleArchiveBit(filespec) Dim fso, f Set fso = CreateObject("Scripting.FileSystemObject") Set f = fso.GetFile(filespec) If f.attributes and 32 Then f.attributes = f.attributes - 32 ToggleArchiveBit = "
Çå¿Õšw™nλ¡£"
Else
f.attributes = f.attributes + 32
ToggleArchiveBit = "
ÔO(sh¨¨)ÖÚw™nλ¡£"
End If
End Function
DateCreated ŒÙÐÔ | DateLastAccessed ŒÙÐÔ | DateLastModified ŒÙÐÔ | Drive ŒÙÐÔ | Files ŒÙÐÔ | IsRootFolder ŒÙÐÔ | Name ŒÙÐÔ | ParentFolder ŒÙÐÔ | Path ŒÙÐÔ | ShortName ŒÙÐÔ | ShortPath ŒÙÐÔ | Size ŒÙÐÔ | SubFolders ŒÙÐÔ | Type ŒÙÐÔ
‘ª(y¨©ng)ÓÃÓÚ£ºFile Œ¦(du¨¬)Ïó | Folder Œ¦(du¨¬)Ïó