Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

ASP GetAbsolutePathName Method

ASP GetAbsolutePathName Method


FileSystemObject Reference Complete FileSystemObject object reference manual


The GetAbsolutePathName method returns the full path from the root drive for a specified path.

Syntax

FileSystemObject.GetAbsolutePathName(path)

Parameters Description
path Required. The path to convert to a full path.

Example

Assume the current directory is c:\temp\test:

Example 1

<%

dim fs,path

set fs=Server.CreateObject("Scripting.FileSystemObject")

path=fs.GetAbsolutePathName("c:")

response.write(path)

%>

Output:

c:\temp\test

Example 2

<%

dim fs,path

set fs=Server.CreateObject("Scripting.FileSystemObject")

path=fs.GetAbsolutePathName("mydoc.txt")

response.write(path)

%>

Output:

c:\temp\test\mydoc.txt

Example 3

<%

dim fs,path

set fs=Server.CreateObject("Scripting.FileSystemObject")

path=fs.GetAbsolutePathName("private\mydoc.txt")

response.write(path)

%>

Output:

c:\temp\test\private\mydoc.txt


FileSystemObject Reference Complete FileSystemObject object reference manual