ASP Drive 屬性
asp drive 屬性

drive 屬性用于返回指定文件或文件夾所在的驅(qū)動器的驅(qū)動器字母(驅(qū)動器號)。
語法
fileobject.drive
folderobject.drive
folderobject.drive
針對 file 對象的實例
<%
dim fs,f
set fs=server.createobject("scripting.filesystemobject")
set f=fs.getfile("c:\test.txt")
response.write("file resides on drive: ")
response.write(f.drive)
set f=nothing
set fs=nothing
%>
輸出:
file resides on drive: c:
dim fs,f
set fs=server.createobject("scripting.filesystemobject")
set f=fs.getfile("c:\test.txt")
response.write("file resides on drive: ")
response.write(f.drive)
set f=nothing
set fs=nothing
%>
輸出:
file resides on drive: c:
針對 folder 對象的實例
<%
dim fs,fo
set fs=server.createobject("scripting.filesystemobject")
set fo=fs.getfolder("c:\test")
response.write("folder resides on drive: ")
response.write(fo.drive)
set fo=nothing
set fs=nothing
%>
輸出:
folder resides on drive: c:
dim fs,fo
set fs=server.createobject("scripting.filesystemobject")
set fo=fs.getfolder("c:\test")
response.write("folder resides on drive: ")
response.write(fo.drive)
set fo=nothing
set fs=nothing
%>
輸出:
folder resides on drive: c:

相關(guān)文章
- ASP 程序
- ASP 表單
- ASP AdRotator
- AJAX 數(shù)據(jù)庫
- 在自己的 PC 上運行 ASP
- ASP AtEndOfLine 屬性
- ASP Close 方法
- ASP Name 屬性
- ASP Path 屬性
- ASP ShortName 屬性
- ASP Delete 方法
- ASP CompareMode 屬性
- ASP RemoveAll 方法
- ASP Cookies 集合
- ASP ExpiresAbsolute 屬性
- ASP TotalBytes 屬性
- ASP BinaryRead 方法
- ASP LCID 屬性
- ASP CreateObject 方法
- ASP GetAbsolutePathName 方法