ASP ShortName ਪ੍ਰਤੀਯੋਗਿਤਾ

ਪਰਿਭਾਸ਼ਾ ਅਤੇ ਵਰਤੋਂ

ShortName ਪ੍ਰਤੀਯੋਗਿਤਾ ਵਿਸ਼ੇਸ਼ ਫਾਈਲ ਜਾਂ ਫੋਲਡਰ ਦਾ ਛੋਟਾ ਨਾਮ (8.3 ਫਾਈਲ ਨਾਮਕਰਨ ਸ਼ਰਤ) ਦੀ ਵਰਤੋਂ ਕਰਦੀ ਹੈ。

ਸਫ਼ਟਿਕਰਨ:

FileObject.ShortName
FolderObject.ShortName

ਫਾਈਲ ਆਬਜੈਕਟ ਦੇ ਉਦਾਹਰਣ ਲਈ

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

خروج:

Name: hitcounterfile.txt
ShortName: HITCOU~1.TXT

ਫੋਲਡਰ ਆਬਜੈਕਟ ਦੇ ਉਦਾਹਰਣ ਲਈ

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

خروج:

نام: ایس پی ٹیسٹ ووب
شورٹ نیم: ایس پی ٹی ای ~ 1