Metode GetAbsolutePathName ASP
definisi dan penggunaan
Metode GetAbsolutePathName mengembalikan jalur penuh dari root drive untuk jalur yang ditentukan.
syarat:
FileSystemObject.GetAbsolutePathName(path)
parameter | deskripsi |
---|---|
path | diperlukan. Perlu diubah menjadi jalan penuh. |
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