ASP GetAbsolutePathName- methode


❮Volledige FileSystemObject Object Reference

De methode GetAbsolutePathName retourneert het volledige pad vanaf de hoofdmap van het station voor het opgegeven pad.

Syntaxis

FileSystemObject.GetAbsolutePathName(path)

Parameter Description
path Required. The path to change to a complete path

Voorbeelden

Neem aan dat de huidige directory c:\temp\test is:

voorbeeld 1

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

Output:

c:\temp\test

Voorbeeld 2

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

Output:

c:\temp\test\mydoc.txt

Voorbeeld 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

❮Volledige FileSystemObject Object Reference