ASP Attributes ÊôÐÔ

¶¨ÒåºÍÓ÷¨

Attributes ÊôÐÔ¿ÉÓÃÀ´ÉèÖûò·µ»ØÖ¸¶¨µÄÎļþ»òÎļþ¼ÐµÄÊôÐÔ¡£

Óï·¨£º

FileObject.Attributes[=newattributes] 
FolderObject.Attributes[=newattributes]
²ÎÊý ÃèÊö
newattributes

¿ÉÑ¡µÄ¡£¹æ¶¨Îļþ»òÎļþ¼ÐµÄÊôÐÔÖµ¡£

²Å²ÉÓÃÏÂÁеÄÖµÖ®Ò»»òÏÂÁÐÖµµÄ×éºÏ£º

  • 0 = ³£¹æÎļþ
  • 1 = Ö»¶ÁÎļþ
  • 2 = Òþ²ØÎļþ
  • 4 = ϵͳÎļþ
  • 16 = Îļþ¼Ð»òĿ¼
  • 32 = ×Ô´ÓÉϴα¸·Ý,ÎļþÒѾ­¸Ä±ä
  • 1024 = Á´½Ó»ò¿ì½Ý·½Ê½
  • 2048 = ѹËõÎļþ

ʵÀý

<%
dim fs,f
set fs=Server.CreateObject("Scripting.FileSystemObject")
set f=fs.GetFile("c:\test.txt")
Response.Write("The attributes of the file are: ")
Response.Write(f.Attributes)
set f=nothing
set fs=nothing
%>

Êä³ö£º

The attributes of the file are: 32
VUE