Properti ShortName ASP

Definisi dan Penggunaan

Properti ShortName digunakan untuk mengembalikan nama pendek dari file atau folder yang ditentukan (konsesi penamaan 8.3).

Syarat:

FileObject.ShortName
FolderObject.ShortName

Contoh

Contoh untuk objek File

<%
dim fs,f
set fs=Server.CreateObject("Scripting.FileSystemObject")
set f=fs.GetFile("c:\hitcounterfile.txt"))
Response.Write("Nama: " & f.Name)
Response.Write("<br />ShortName: " & f.ShortName)
set f=nothing
set fs=nothing
%>

Output:

Nama: hitcounterfile.txt
Nama Pendek: HITCOU~1.TXT

Contoh untuk objek Folder

<%
dim fs,fo
set fs=Server.CreateObject("Scripting.FileSystemObject")
set fo=fs.GetFolder("c:\asp_test_web")
Response.Write("Nama: " & fo.Name)
Response.Write("<br />ShortName: " & fo.ShortName)
set fo=nothing
set fs=nothing
%>

Output:

Name: asp_test_web
ShortName: ASP_TE~1