ASP GetDrive 方法

定義和用法

GetDrive 方法可返回由 drivespec 參數規定的 Drive 對象。

語法:

FileSystemObject.GetDrive(drivespec)
參數 描述
drivespec 必需的。可以是驅動器字母 (c),或者帶有冒號的驅動器字母,或者帶有冒號和路徑分隔符的驅動器字母,或者任何網絡共享規范 (\\computer2\share1)。

實例

<%
dim fs,d
set fs=Server.CreateObject("Scripting.FileSystemObject")
set d=fs.GetDrive("c:\")
set fs=nothing
%>