ASP Type ਰੂਪ

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

Type ਰਾਹੀਂ ਵਿਸ਼ੇਸ਼ ਫਾਇਲ ਜਾਂ ਫੋਲਡਰ ਦੀ ਕਿਸਮ ਲਿਆਉਣ ਲਈ ਵਰਤਿਆ ਜਾਂਦਾ ਹੈ。

ਸਿਧਾਂਤ:

FileObject.Type
FolderObject.Type

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

ਉਦਾਹਰਣ 1

<%
dim fs,f
set fs=Server.CreateObject("Scripting.FileSystemObject")
set f=fs.GetFile("c:test.txt")
Response.Write("The file test.txt is of type: ")
Response.Write(f.Type)
set f=nothing
fs=nothing ست
%>

خروج:

The file test.txt is of type: Text Document

ਉਦਾਹਰਣ 2

<%
dim fs,f
set fs=Server.CreateObject("Scripting.FileSystemObject")
set f=fs.GetFile("c:test.asp")
Response.Write("The file test.asp is of type: ")
Response.Write(f.Type)
set f=nothing
fs=nothing ست
%>

خروج:

The file test.asp is of type: Active Server Document

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

<%
dim fs,fo
set fs=Server.CreateObject("Scripting.FileSystemObject")
set fo=fs.GetFolder("c:\test")
Response.Write("ਫੋਲਡਰ test ਦੀ ਕਿਸਮ ਹੈ: ")
Response.Write(fo.Type)
fo=nothing ست
fs=nothing ست
%>

خروج:

فولدر ٹیسٹ کا تیپ فائل فولدر ہے