|
| |
|
|
|
|
|
|
|
|
|
|
| |
|
|
|
|
|
|
Topic : Find Free Space of Given Drive
|
|
Author : Jignesh Desai
|
Total Visits: 139
|
|
Published Date:
Tuesday, May 02, 2000
|
|
|
<%
Function ShowFreeSpace(drvPath)
Dim fso, d, s
Set fso = CreateObject("Scripting.FileSystemObject")
Set d = fso.GetDrive(fso.GetDriveName(drvPath))
s = "<br>Drive " & UCase(drvPath) & " - "
s = s & d.VolumeName & "<BR>"
s = s & "Free Space: " & FormatNumber(d.FreeSpace/1024, 0)
s = s & " Kbytes"
ShowFreeSpace = s
End Function
Response.Write ShowFreeSpace("C:")
Response.Write ShowFreeSpace("D:")
Response.Write ShowFreeSpace("F:")
%> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|