ASP ShortPath 속성
정의와 사용법
ShortPath 속성은 지정된 파일이나 폴더의 짧은 경로를 반환합니다. (8.3 파일 이름 규약)
문법:
FileObject.ShortPath FolderObject.ShortPath
File 객체에 대한 예제
<% dim fs,f set fs=Server.CreateObject("Scripting.FileSystemObject") set f=fs.GetFile("c:\asp_test_web\hitcounterfile.txt") Response.Write("경로: " & f.Path) Response.Write("<br />ShortPath: " & f.ShortPath) set f=nothing set fs=nothing %>
출력:
Path: C:\asp_test_web\hitcounterfile.txt ShortPath: C:\ASP_TE~1\HITCOU~1.TXT
Folder 객체에 대한 예제
<% dim fs,fo set fs=Server.CreateObject("Scripting.FileSystemObject") set fo=fs.GetFolder("c:\asp_test_web") Response.Write("경로: " & fo.Path) Response.Write("<br />ShortPath: " & fo.ShortPath) set fo=nothing set fs=nothing %>
출력:
Path: C:\asp_test_web ShortPath: C:\ASP_TE~1