TUTORIALBackendFETCHED

ASP GetDrive 方法

ASP GetDrive 方法 完整的 FileSystemObject 对象参考手册 GetDrive 方法返回由 drivespec 参数规定的 Drive 对象。 语法 FileSystemObject.GetDrive(drivespec) 参数 描述 drivespec 必需的。可以是驱动器字母(c),或者带有冒号的驱动器字母(c:),或者带有冒号和路径分隔符的驱动器字母(c:..

Updated 7/16/2026

Tutorial detail pages default to noindex.

ASP GetDrive 方法


FileSystemObject 对象参考手册 完整的 FileSystemObject 对象参考手册

GetDrive 方法返回由 drivespec 参数规定的 Drive 对象。

语法

FileSystemObject.GetDrive(drivespec)

参数 描述
drivespec 必需的。可以是驱动器字母(c),或者带有冒号的驱动器字母(c:),或者带有冒号和路径分隔符的驱动器字母(c:\),或者任何网络共享规范(\\computer2\share1)。

实例

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


FileSystemObject 对象参考手册 完整的 FileSystemObject 对象参考手册