ASP GetDriveName 方法
定义和用法
GetDriveName 方法返回一个字符串,该值是指定路径的驱动器名称。
语法:
FileSystemObject.GetDriveName(path)
| 参数 | 描述 |
|---|---|
| path | 必需的。可返回驱动器名称的路径。 |
实例
<%dim fs,dnameset fs=Server.CreateObject("Scripting.FileSystemObject")dname=fs.GetDriveName("c:\test\test.htm")Response.Write(dname)set fs=nothing%>
输出:
c: