ÄúµÄλÖãºÑ°ÃÎÍøÊ×Ò³£¾±à³ÌÀÖÔ°£¾VBScript£¾VBScript


objects constants operators statements functions properties methods







METHOD:  FileSystemObject.GetAbsolutePathName

object.GetAbsolutePathName(path)

This method returns the complete path from the root of the drive for the specified path string.

The following examples assume that the current directory is c:\DevGuru\website
Code:
<%
dim filesys, pathstring
set filesys=CreateObject("Scripting.FileSystemObject")
pathstring = filesys.GetAbsolutePathName("c:")
%>


Output:
"c:\DevGuru\website"


Code:
<%
dim filesys, pathstring
set filesys=CreateObject("Scripting.FileSystemObject")
pathstring = filesys.GetAbsolutePathName("VBScript.html")
%>


Output:
"c:\DevGuru\website\VBScript.html"