ASP Attributes 속성
정의 및 사용법
Attributes 속성은 지정된 파일이나 폴더의 속성을 설정하거나 반환합니다.
문법:
FileObject.Attributes[=newattributes] FolderObject.Attributes[=newattributes]
파라미터 | 설명 |
---|---|
newattributes |
선택 사항. 파일이나 폴더의 속성 값을 지정합니다. 다음 중 하나 또는 그 组합을 사용할 수 있습니다:
|
File 객체에 대한 예제
<% dim fs,f set fs=Server.CreateObject("Scripting.FileSystemObject") set f=fs.GetFile("c:\test.txt") Response.Write("파일의 속성은: ") Response.Write("}}")f.Attributes) set f=nothing fs=nothing 설정 %>
출력:
파일의 속성은: 32
Folder 객체에 대한 예제
<% dim fs,fo set fs=Server.CreateObject("Scripting.FileSystemObject") set fo=fs.GetFolder("c:\test") Response.Write("文件夹的属性是: ") Response.Write("}}")fo.Attributes) fo=nothing 설정 fs=nothing 설정 %>
출력:
폴더의 속성은: 16