ASP GetAbsolutePathName 메서드
정의와 사용법
GetAbsolutePathName 메서드는 지정된 경로에서 루트 드라이브 시작하는 전체 경로를 반환합니다.
문법:
FileSystemObject.GetAbsolutePathName(path)
파라미터 | 설명 |
---|---|
path | 필수입니다. 전체 경로로 변경해야 합니다. |
예제
예제 1
<% dim fs,path set fs=Server.CreateObject("Scripting.FileSystemObject") path=fs.GetAbsolutePathName("c:") response.write(path) %>
출력:
c:\temp\test
예제 2
<% dim fs,path set fs=Server.CreateObject("Scripting.FileSystemObject") path=fs.GetAbsolutePathName("mydoc.txt") response.write(path) %>
출력:
c:\temp\test\mydoc.txt
예제 3
<% dim fs,path set fs=Server.CreateObject("Scripting.FileSystemObject") path=fs.GetAbsolutePathName("private\mydoc.txt") response.write(path) %>
출력:
c:\temp\test\private\mydoc.txt