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)
f=nothing 설정
fs=nothing 설정
%>

출력:

파일의 속성은: 32