tutorial pengembangan web terbaru
 

ASP Drive Property


<Complete Reference Folder Obyek

Properti Drive digunakan untuk mengembalikan huruf drive dari drive di mana file atau folder tertentu berada.

Sintaksis

FileObject.Drive

FolderObject.Drive

Contoh untuk objek File

<%
dim fs,f
set fs=Server.CreateObject("Scripting.FileSystemObject")
set f=fs.GetFile("c:\test.txt")
Response.Write("File resides on drive: ")
Response.Write(f.Drive)
set f=nothing
set fs=nothing
%>

Output:

File resides on drive: c:

Misalnya untuk objek Folder

<%
dim fs,fo
set fs=Server.CreateObject("Scripting.FileSystemObject")
set fo=fs.GetFolder("c:\test")
Response.Write("Folder resides on drive: ")
Response.Write(fo.Drive)
set fo=nothing
set fs=nothing
%>

Output:

Folder resides on drive: c:

<Complete Reference Folder Obyek