Fri Apr 08, 2011 2:57 pm
<html>
<%
'declare our variables
Dim objFileSyetm, objDriveFile, driveObj
' create File System Object.
objFileSyetm = Server.CreateObject("Scripting.FileSystemObject")
objDriveFile = objFileSyetm.Drives
'loop for every drive
For Each driveObj In objDriveFile
'check if drive ready.
If driveObj.IsReady Then
Response.Write("Drive Letter:" & driveObj.DriveLetter & "<br>")
Response.Write("Drive Path:" & driveObj.Path & "<br>")
Response.Write("Drive Free Space:" & driveObj.FreeSpace & "<br>")
Response.Write("Drive Total Size:" & driveObj.TotalSize & "<br>")
Response.Write("Drive File System:" & driveObj.FileSystem & "<br>")
Else
'driver not ready .
Response.Write(driveObj.DriveLetter & "<br>")
Response.Write("is unavailable")
End If
Next
' delete objects.
objDriveFile = Nothing
objFileSyetm = Nothing
%>
</html>
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com
Powered by phpBB © phpBB Group.