Skip to content
Related Articles

Related Articles

Improve Article
ASP FreeSpace Property
  • Last Updated : 22 Mar, 2021

The ASP FreeSpace Property is used to return the amount of free storage space provided to a user on a particular drive. It returns a value in terms of bytes. 

Syntax:

DriveObject.FreeSpace

Example: The below code illustrates the ASP Drive.FreeSpace Property.

ASP




<%
dim fs,dr
set fs=Server.CreateObject("Scripting.FileSystemObject")
    
'Getting the drive to be checked
set dr=fs.GetDrive("d:")
Response.Write("The drive " & dr)
  
'Getting the free space on the drive
Response.Write(" has " & dr.FreeSpace & " free space")
    
set dr=nothing
set fs=nothing
%>

Output:

The drive D: has 8237483934 free space
My Personal Notes arrow_drop_up
Recommended Articles
Page :