ASP Type 속성
정의와 사용법
Type 속성은 지정된 파일이나 폴더의 유형을 반환합니다.
문법:
FileObject.Type FolderObject.Type
File 객체에 대한 예제
<% dim fs,f set fs=Server.CreateObject("Scripting.FileSystemObject") set f=fs.GetFile("c:help.txt") Response.Write("The file test.txt is of type: ") Response.Write("}}")f.Type) f=nothing 설정 fs=nothing 설정 %>
출력:
The file help.txt is of type: Text Document
Folder 객체에 대한 예제
<% dim fs,f set fs=Server.CreateObject("Scripting.FileSystemObject") set f=fs.GetFile("c:help.asp") Response.Write("The file test.asp is of type: ") Response.Write("}}")f.Type) f=nothing 설정 fs=nothing 설정 %>
출력:
file help.asp 파일은 Active Server Document 类型입니다: