VBScript » FileSystemObject » GetAbsolutePathName

Version: 2.0

Syntax:
object.GetAbsolutePathName(path)

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

Examples

Code:
<%
dim filesys, pathstring
set filesys=CreateObject("Scripting.FileSystemObject")
pathstring = filesys.GetAbsolutePathName("c:")
%>
Output:
"c:\DevGuru\website"
Explanation:

This example assumes that the current directory is c:\DevGuru\website

Code:
<%
dim filesys, pathstring
set filesys=CreateObject("Scripting.FileSystemObject")
pathstring = filesys.GetAbsolutePathName("VBScript.html")
%>
Output:
"c:\DevGuru\website\VBScript.html"
Explanation:

This example assumes that the current directory is c:\DevGuru\website