ASP Type 属性
asp type 属性
完整的 file 对象参考手册type 属性用于返回指定文件或文件夹的类型。
语法
fileobject.type
folderobject.type
folderobject.type
针对 file 对象的实例
<%
dim fs,f
set fs=server.createobject("scripting.filesystemobject")
set f=fs.getfile("c:\test.txt")
response.write("the file test.txt is of type: ")
response.write(f.type)
set f=nothing
set fs=nothing
%>
输出:
the file test.txt is of type: text document
dim fs,f
set fs=server.createobject("scripting.filesystemobject")
set f=fs.getfile("c:\test.txt")
response.write("the file test.txt is of type: ")
response.write(f.type)
set f=nothing
set fs=nothing
%>
输出:
the file test.txt is of type: text document
<%
dim fs,f
set fs=server.createobject("scripting.filesystemobject")
set f=fs.getfile("c:\test.asp")
response.write("the file test.asp is of type: ")
response.write(f.type)
set f=nothing
set fs=nothing
%>
输出:
the file test.asp is of type: active server document
dim fs,f
set fs=server.createobject("scripting.filesystemobject")
set f=fs.getfile("c:\test.asp")
response.write("the file test.asp is of type: ")
response.write(f.type)
set f=nothing
set fs=nothing
%>
输出:
the file test.asp is of type: active server document
针对 folder 对象的实例
<%
dim fs,fo
set fs=server.createobject("scripting.filesystemobject")
set fo=fs.getfolder("c:\test")
response.write("the folder test is of type: ")
response.write(fo.type)
set fo=nothing
set fs=nothing
%>
输出:
the folder test is of type: file folder
dim fs,fo
set fs=server.createobject("scripting.filesystemobject")
set fo=fs.getfolder("c:\test")
response.write("the folder test is of type: ")
response.write(fo.type)
set fo=nothing
set fs=nothing
%>
输出:
the folder test is of type: file folder
完整的 file 对象参考手册
相关文章
- ASP Dictionary 对象
- ASP Line 属性
- ASP SkipLine 方法
- ASP Name 属性
- ASP Type 属性
- ASP SubFolders 集合
- ASP CacheControl 属性
- ASP Expires 属性
- ASP ExpiresAbsolute 属性
- ASP Clear 方法
- ASP End 方法
- ASP QueryString 集合
- ASP Contents.RemoveAll 方法
- ASP Abandon 方法
- ASP Execute 方法
- ASP CopyFolder 方法
- ASP FolderExists 方法
- ASP GetFolder 方法
- ASP GetParentFolderName 方法
- ASP MoveFile 方法