01.
<%
Option
Explicit %>
02.
<html>
03.
<head>
04.
<title>ThaiCreate.Com ASP Drive
Object
</title>
05.
</head>
06.
<body>
07.
<%
08.
Dim
objFSO, objDrive
09.
Set
objFSO = Server.CreateObject(
"Scripting.FileSystemObject"
)
10.
Set
objDrive = objFSO.GetDrive(
"C:"
)
11.
Response.Write
"DriveLetter : "
& objDrive.DriveLetter &
"<br>"
12.
Response.Write
"DriveType : "
& objDrive.DriveType &
"<br>"
13.
Response.Write
"IsReady : "
& objDrive.IsReady &
"<br>"
14.
Response.Write
"FileSystem : "
& objDrive.FileSystem &
"<br>"
15.
Response.Write
"Path : "
& objDrive.Path &
"<br>"
16.
Response.Write
"RootFolder : "
& objDrive.RootFolder &
"<br>"
17.
Response.Write
"ShareName : "
& objDrive.ShareName &
"<br>"
18.
Response.Write
"SerialNumber : "
& objDrive.SerialNumber &
"<br>"
19.
Response.Write
"VolumeName : "
& objDrive.VolumeName &
"<br>"
20.
Response.Write
"AvailableSpace : "
& objDrive.AvailableSpace &
" bytes<br>"
21.
Response.Write
"FreeSpace : "
& objDrive.FreeSpace &
" bytes <br/>"
22.
Response.Write
"TotalSize : "
& objDrive.TotalSize &
" bytes"
23.
Set
objFSO =
Nothing
24.
Set
objDrive =
Nothing
25.
%>
26.
</body>
27.
</html>