ASP GetAbsolutePathName 方法

定义和用法

GetAbsolutePathName 方法为指定路径返回从根驱动器开始的完整路径。

语法:

FileSystemObject.GetAbsolutePathName(path)
参数 描述
path 必需的。需修改为完整路径的路径。

实例

例子 1

<%
dim fs,path
set fs=Server.CreateObject("Scripting.FileSystemObject")
path=fs.GetAbsolutePathName("c:")
response.write(path)
%>

输出:

c:\temp\test

例子 2

<%
dim fs,path
set fs=Server.CreateObject("Scripting.FileSystemObject")
path=fs.GetAbsolutePathName("mydoc.txt")
response.write(path)
%>

输出:

c:\temp\test\mydoc.txt

例子 3

<%
dim fs,path
set fs=Server.CreateObject("Scripting.FileSystemObject")
path=fs.GetAbsolutePathName("private\mydoc.txt")
response.write(path)
%>

输出:

c:\temp\test\private\mydoc.txt
系统帮助 | 给我留言 | 收藏本站
Copyright © 2005-2008 www.cnn84.com All Rights Reserved Ver:2.0
CNN84网是公益性便民网站,是为了给大家的日常生活查询及提供最快捷的出行指南