Mafanikio ya ASP

Muundo na Matumizi

Mchano wa Size wa sababu ya kuonekana ukubwa wa file au folda.

Mafanikio:

FileObject.Size
FolderObject.Size

Mfano wa File

<%
dim fs,f
set fs=Server.CreateObject("Scripting.FileSystemObject")
set f=fs.GetFile("c:\help.asp")
Response.Write("K size ya test.asp ni:")
Response.Write(f.Size & " bytes.")
set f=nothing
set fs=nothing
%>

输出:

K size ya help.asp ni: 15606 bytes.

Mfano wa Folda

<%
dim fs,fo
set fs=Server.CreateObject("Scripting.FileSystemObject")
set fo=fs.GetFolder("c:\help")
Response.Write("K size ya kadi ya folda ya test ni:")
Response.Write(fo.Size & " bytes.")
set fo=nothing
set fs=nothing
%>

输出:

The size of the folder help is: 123456 bytes.