Open In App

ASP FreeSpace Property

Improve
Improve
Like Article
Like
Save
Share
Report

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

Last Updated : 22 Mar, 2021
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads