Mwili wa Drive katika ASP

Mifano na Matumizi

Mwili wa Drive unaonyesha herufi ya kifungu (kitambaa cha kifungu) kwa faili au kifungu kwenye kifungu kwenye kifungu kwenye kifungu.

Muungano:

FileObject.Drive
FolderObject.Drive

Mfano

Mfano wa kwa msingi wa File

<%
dim fs,f
set fs=Server.CreateObject("Scripting.FileSystemObject")
set f=fs.GetFile("d:\test.txt")
Response.Write("Faili inahusiana na kifungu: ")
Response.Write(f.Drive)
set f=nothing
set fs=nothing
%>

Muonekano:

Faili inahusiana na kifungu: d:

Mfano wa kwa msingi ya Folder

<%
dim fs,fo
set fs=Server.CreateObject("Scripting.FileSystemObject")
set fo=fs.GetFolder("d:\test")
Response.Write("Folda inaishi kwenye drive: ")
Response.Write(fo.Drive)
set fo=nothing
set fs=nothing
%>

Muonekano:

Folda inaishi kwenye drive: d: