Metode GetAbsolutePathName ASP

Definisi dan Penggunaan

Metode GetAbsolutePathName mengembalikan jalur penuh dari root drive untuk jalur yang ditentukan.

Sintaks:

FileSystemObject.GetAbsolutePathName(path)
Parameter Deskripsi
path Diperlukan. Harus diubah menjadi jalur lengkap.

Contoh

Contoh 1

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

Output:

c:\temp\test

Contoh 2

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

Output:

c:\temp\test\mydoc.txt

Contoh 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