Propiedad ShortPath de ASP
Definición y uso
La propiedad ShortPath se utiliza para devolver la ruta corta del archivo o carpeta especificado (convenios de nombramiento de archivos 8.3).
Sintaxis:
FileObject.ShortPath FolderObject.ShortPath
Ejemplo para el objeto File
<% dim fs,f set fs=Server.CreateObject("Scripting.FileSystemObject") set f=fs.GetFile("c:\asp_test_web\hitcounterfile.txt") Response.Write("Ruta: " & f.Path) Response.Write("<br />ShortPath: " & f.ShortPath) set f=nothing set fs=nothing %>
Salida:
Path: C:\asp_test_web\hitcounterfile.txt ShortPath: C:\ASP_TE~1\HITCOU~1.TXT
Ejemplo para el objeto Folder
<% dim fs,fo set fs=Server.CreateObject("Scripting.FileSystemObject") set fo=fs.GetFolder("c:\asp_test_web") Response.Write("Ruta: " & fo.Path) Response.Write("<br />ShortPath: " & fo.ShortPath) set fo=nothing set fs=nothing %>
Salida:
Path: C:\asp_test_web ShortPath: C:\ASP_TE~1