This much in ASP.NET will return the disk free space using VB.NET :
Private Sub Page_Load _
(ByVal sender As System.Object, _
ByVal e As System.EventArg s) _
Handles MyBase.Load
Response.Write( free_space("c:\ ").ToString )
End Sub
<DllImport("Ker nel32.dll")> _
Public Shared Function GetDiskFreeSpac eEx _
(ByVal lpszPath As String, _
ByRef lpFreeBytesAvai lable As Long, _
ByRef lpTotalNumberOf Bytes As Long, _
ByRef lpTotalNumberOf FreeBytes As Long) As Boolean
End Function
Public Function free_space _
(ByVal folder_name As String) As Long
Dim free As Long = 0
Dim dummy1 As Long = 0
Dim dummy2 As Long = 0
If GetDiskFreeSpac eEx _
(folder_name, free, dummy1, dummy2) Then
Return free
Else
Return -1
End If
End Function 'free_space
Ken
Microsoft MVP [ASP.NET]
"laurie" <la****@hotmail .com> wrote in message
news:Xh******** ********@newsfe 2-gui.server.ntli .net...
Hi.
Does anyone know of a simple asp script that can check free disk space and
send an email to someone when low disk space occurs? I
am not familiar with asp. I am from a php background but our server
doesn't support php only asp.
Thanks
Laurie